Skip to content

Commit 555d68a

Browse files
committed
Fix unchecked operations
1 parent c932596 commit 555d68a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/main/java/the/bytecode/club/bytecodeviewer/searching/impl/MemberWithAnnotationSearch.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import javax.swing.*;
1616
import java.awt.*;
17+
import java.util.Arrays;
1718
import java.util.List;
1819

1920
/***************************************************************************
@@ -67,11 +68,13 @@ public void search(final ResourceContainer container, final String resourceWorki
6768

6869
if (srchText.isEmpty()) return;
6970

70-
node.fields.stream().filter(fn -> hasAnnotation(srchText, fn.invisibleAnnotations, fn.visibleAnnotations)).forEach(fn -> BytecodeViewer.viewer.searchBoxPane.treeRoot.add(new LDCSearchTreeNodeResult(container, resourceWorkingName, node, null, fn, fn.name + " " + fn.desc, "")));
71-
node.methods.stream().filter(mn -> hasAnnotation(srchText, mn.invisibleAnnotations, mn.visibleAnnotations)).forEach(mn -> BytecodeViewer.viewer.searchBoxPane.treeRoot.add(new LDCSearchTreeNodeResult(container, resourceWorkingName, node, mn, null, mn.name + mn.desc, "")));
71+
node.fields.stream().filter(fn -> hasAnnotation(srchText, Arrays.asList(fn.invisibleAnnotations, fn.visibleAnnotations)))
72+
.forEach(fn -> BytecodeViewer.viewer.searchBoxPane.treeRoot.add(new LDCSearchTreeNodeResult(container, resourceWorkingName, node, null, fn, fn.name + " " + fn.desc, "")));
73+
node.methods.stream().filter(mn -> hasAnnotation(srchText, Arrays.asList(mn.invisibleAnnotations, mn.visibleAnnotations)))
74+
.forEach(mn -> BytecodeViewer.viewer.searchBoxPane.treeRoot.add(new LDCSearchTreeNodeResult(container, resourceWorkingName, node, mn, null, mn.name + mn.desc, "")));
7275
}
7376

74-
public static boolean hasAnnotation(String annotation, List<AnnotationNode>... annoLists) {
77+
public static boolean hasAnnotation(String annotation, List<List<AnnotationNode>> annoLists) {
7578
if (annoLists == null) return false;
7679
for (List<AnnotationNode> annos : annoLists) {
7780
if (annos == null) continue;

0 commit comments

Comments
 (0)