We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1935655 commit 7006070Copy full SHA for 7006070
src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java
@@ -667,11 +667,8 @@ static boolean isCallerSensitive(MemberName mem) {
667
668
static boolean canBeCalledVirtual(MemberName mem) {
669
assert(mem.isInvocable());
670
- switch (mem.getName()) {
671
- case "getContextClassLoader":
672
- return canBeCalledVirtual(mem, java.lang.Thread.class);
673
- }
674
- return false;
+ return mem.getName().equals("getContextClassLoader") &&
+ canBeCalledVirtual(mem, java.lang.Thread.class);
675
}
676
677
static boolean canBeCalledVirtual(MemberName symbolicRef, Class<?> definingClass) {
0 commit comments