File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
junit-platform-launcher/src/main/java/org/junit/platform/launcher/core Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 2222
2323import org .jspecify .annotations .Nullable ;
2424import org .junit .platform .commons .JUnitException ;
25- import org .junit .platform .commons .support .ReflectionSupport ;
2625import org .junit .platform .commons .util .ClassLoaderUtils ;
2726
2827/**
@@ -51,11 +50,7 @@ class ClasspathAlignmentChecker {
5150
5251 static Optional <JUnitException > check (LinkageError error ) {
5352 ClassLoader classLoader = ClassLoaderUtils .getClassLoader (ClasspathAlignmentChecker .class );
54- Function <String , Package > packageLookup = name -> ReflectionSupport .findMethod (ClassLoader .class ,
55- "getDefinedPackage" , String .class ) //
56- .map (m -> (Package ) ReflectionSupport .invokeMethod (m , classLoader , name )) //
57- .orElseGet (() -> getPackage (name ));
58- return check (error , packageLookup );
53+ return check (error , classLoader ::getDefinedPackage );
5954 }
6055
6156 // VisibleForTesting
You can’t perform that action at this time.
0 commit comments