mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8296329: jar validator doesn't account for minor class file version
Reviewed-by: jvernee
This commit is contained in:
parent
09f70dad2f
commit
faf48e61be
3 changed files with 126 additions and 4 deletions
|
@ -105,7 +105,7 @@ final class FingerPrint {
|
|||
}
|
||||
|
||||
public boolean isCompatibleVersion(FingerPrint that) {
|
||||
return attrs.version >= that.attrs.version;
|
||||
return attrs.majorVersion >= that.attrs.majorVersion;
|
||||
}
|
||||
|
||||
public boolean isSameAPI(FingerPrint that) {
|
||||
|
@ -236,7 +236,7 @@ final class FingerPrint {
|
|||
private String name;
|
||||
private String outerClassName;
|
||||
private String superName;
|
||||
private int version;
|
||||
private int majorVersion;
|
||||
private int access;
|
||||
private boolean publicClass;
|
||||
private boolean nestedClass;
|
||||
|
@ -255,7 +255,7 @@ final class FingerPrint {
|
|||
@Override
|
||||
public void visit(int version, int access, String name, String signature,
|
||||
String superName, String[] interfaces) {
|
||||
this.version = version;
|
||||
this.majorVersion = version & 0xFFFF; // JDK-8296329: extract major version only
|
||||
this.access = access;
|
||||
this.name = name;
|
||||
this.nestedClass = name.contains("$");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue