Skip to content

Commit 558a496

Browse files
committed
fix(burp): fix Java 11 compatibility in TitleExtractor
- Replace Stream.toList() with Stream.collect(Collectors.toList()) - Add missing import for java.util.stream.Collectors
1 parent 5c05d6b commit 558a496

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/burpEx/legacy-api/src/main/java/com/sqlmapwebui/burp/util/TitleExtractor.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import java.util.Map;
1616
import java.util.regex.Matcher;
1717
import java.util.regex.Pattern;
18+
import java.util.stream.Collectors;
1819

1920
/**
2021
* 终端窗口标题提取器
@@ -143,7 +144,7 @@ public static String extract(IHttpRequestResponse httpRequestResponse, IExtensio
143144
List<TitleRule> sortedEnabledRules = rules.stream()
144145
.filter(TitleRule::isEnabled)
145146
.sorted(Comparator.comparingInt(TitleRule::getPriority))
146-
.toList();
147+
.collect(Collectors.toList());
147148

148149
LOGGER.debug("启用的规则数量: {}", sortedEnabledRules.size());
149150

@@ -403,8 +404,8 @@ public static ExtractionResult extractWithInfo(String rawRequest, List<TitleRule
403404
List<TitleRule> sortedEnabledRules = rules.stream()
404405
.filter(TitleRule::isEnabled)
405406
.sorted(Comparator.comparingInt(TitleRule::getPriority))
406-
.toList();
407-
407+
.collect(Collectors.toList());
408+
408409
// 依次尝试每个规则
409410
for (TitleRule rule : sortedEnabledRules) {
410411
try {

0 commit comments

Comments
 (0)