mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8265418: Clean-up redundant null-checks of Class.getPackageName()
Reviewed-by: redestad
This commit is contained in:
parent
41185d38f2
commit
ae258f1e6a
8 changed files with 13 additions and 19 deletions
|
@ -27,7 +27,6 @@ package sun.invoke.util;
|
|||
|
||||
import java.lang.reflect.Modifier;
|
||||
import static java.lang.reflect.Modifier.*;
|
||||
import java.util.Objects;
|
||||
import jdk.internal.reflect.Reflection;
|
||||
|
||||
/**
|
||||
|
@ -375,7 +374,7 @@ public class VerifyAccess {
|
|||
return true;
|
||||
if (class1.getClassLoader() != class2.getClassLoader())
|
||||
return false;
|
||||
return Objects.equals(class1.getPackageName(), class2.getPackageName());
|
||||
return class1.getPackageName() == class2.getPackageName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue