mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8265426: Update java.security to use instanceof pattern variable
Reviewed-by: rriggs, weijun, dfuchs
This commit is contained in:
parent
3fcdc50e44
commit
86b8dc9f5b
23 changed files with 85 additions and 165 deletions
|
@ -254,18 +254,10 @@ public class SecureClassLoader extends ClassLoader {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!(obj instanceof CodeSourceKey)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CodeSourceKey csk = (CodeSourceKey) obj;
|
||||
|
||||
if (!Objects.equals(cs.getLocationNoFragString(),
|
||||
csk.cs.getLocationNoFragString())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return cs.matchCerts(csk.cs, true);
|
||||
return obj instanceof CodeSourceKey other
|
||||
&& Objects.equals(cs.getLocationNoFragString(),
|
||||
other.cs.getLocationNoFragString())
|
||||
&& cs.matchCerts(other.cs, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue