File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
class-match/src/main/java/datadog/instrument/classmatch Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ static Predicate<String[]> declaresAnnotation(String name) {
3131
3232 /** Matches when at least one annotation has one of the given names. */
3333 static Predicate <String []> declaresAnnotationOneOf (Collection <String > names ) {
34- Set <String > internalNames = internalNames (names );
34+ Set <String > internalNames = new HashSet <>((int ) (names .size () / 0.75f ) + 1 );
35+ for (String name : names ) {
36+ internalNames .add (internalName (name ));
37+ }
3538 // note these annotations are of interest when parsing
3639 ClassFile .annotationsOfInterest (internalNames );
3740 // performance tip: capture this method-ref outside the lambda
@@ -145,15 +148,6 @@ static String internalName(String name) {
145148 return name .replace ('.' , '/' );
146149 }
147150
148- /** Returns the internal forms of the given names. */
149- static Set <String > internalNames (Collection <String > names ) {
150- Set <String > internalNames = new HashSet <>((int ) (names .size () / 0.75f ) + 1 );
151- for (String name : names ) {
152- internalNames .add (internalName (name ));
153- }
154- return internalNames ;
155- }
156-
157151 /** Returns {@code true} if at least one of the candidates matches. */
158152 static <T > boolean anyMatch (T [] candidates , Predicate <T > matcher ) {
159153 for (T c : candidates ) {
You can’t perform that action at this time.
0 commit comments