Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2019-03-21 14:13:29 +0000
committerStephan Herrmann2019-03-21 14:13:29 +0000
commit7e648ad52d39e497ae67fdba898f57e273551ccf (patch)
tree9cada24f77e7083a4964cd95bf8a67a93079b134 /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt
parente02c8a79289b0ab7391ddde247434f604b181e74 (diff)
downloadorg.eclipse.objectteams-7e648ad52d39e497ae67fdba898f57e273551ccf.tar.gz
org.eclipse.objectteams-7e648ad52d39e497ae67fdba898f57e273551ccf.tar.xz
org.eclipse.objectteams-7e648ad52d39e497ae67fdba898f57e273551ccf.zip
update jdt.core to I20190321-0435 (first build with Java 12 support)
- initial rough merge
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/InnerClassInfo.java12
2 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
index e86303e7f..6d2105f0b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
@@ -134,9 +134,10 @@ public interface ClassFileConstants {
int MAJOR_VERSION_9 = 53;
int MAJOR_VERSION_10 = 54;
int MAJOR_VERSION_11 = 55;
+ int MAJOR_VERSION_12 = 56;
int MAJOR_VERSION_0 = 44;
- int MAJOR_LATEST_VERSION = MAJOR_VERSION_11;
+ int MAJOR_LATEST_VERSION = MAJOR_VERSION_12;
int MINOR_VERSION_0 = 0;
int MINOR_VERSION_1 = 1;
@@ -158,6 +159,7 @@ public interface ClassFileConstants {
long JDK9 = ((long)ClassFileConstants.MAJOR_VERSION_9 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK10 = ((long)ClassFileConstants.MAJOR_VERSION_10 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK11 = ((long)ClassFileConstants.MAJOR_VERSION_11 << 16) + ClassFileConstants.MINOR_VERSION_0;
+ long JDK12 = ((long)ClassFileConstants.MAJOR_VERSION_12 << 16) + ClassFileConstants.MINOR_VERSION_0;
public static long getLatestJDKLevel() {
return ((long)ClassFileConstants.MAJOR_LATEST_VERSION << 16) + ClassFileConstants.MINOR_VERSION_0;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/InnerClassInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/InnerClassInfo.java
index 5539c2938..b57f0aeb7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/InnerClassInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/InnerClassInfo.java
@@ -28,9 +28,9 @@ public class InnerClassInfo extends ClassFileStruct implements IBinaryNestedType
private char[] outerClassName;
private char[] innerName;
private int accessFlags = -1;
- private boolean readInnerClassName = false;
- private boolean readOuterClassName = false;
- private boolean readInnerName = false;
+ private boolean readInnerClassName;
+ private boolean readOuterClassName;
+ private boolean readInnerName;
public InnerClassInfo(byte classFileBytes[], int offsets[], int offset) {
super(classFileBytes, offsets, offset);
@@ -43,7 +43,6 @@ public InnerClassInfo(byte classFileBytes[], int offsets[], int offset) {
public char[] getEnclosingTypeName() {
if (!this.readOuterClassName) {
// read outer class name
- this.readOuterClassName = true;
if (this.outerClassNameIndex != 0) {
int utf8Offset =
this.constantPoolOffsets[u2At(
@@ -51,6 +50,7 @@ public char[] getEnclosingTypeName() {
- this.structOffset;
this.outerClassName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
}
+ this.readOuterClassName = true;
}
return this.outerClassName;
@@ -69,12 +69,12 @@ public int getModifiers() {
public char[] getName() {
if (!this.readInnerClassName) {
// read the inner class name
- this.readInnerClassName = true;
if (this.innerClassNameIndex != 0) {
int classOffset = this.constantPoolOffsets[this.innerClassNameIndex] - this.structOffset;
int utf8Offset = this.constantPoolOffsets[u2At(classOffset + 1)] - this.structOffset;
this.innerClassName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
}
+ this.readInnerClassName = true;
}
return this.innerClassName;
}
@@ -86,11 +86,11 @@ public char[] getName() {
*/
public char[] getSourceName() {
if (!this.readInnerName) {
- this.readInnerName = true;
if (this.innerNameIndex != 0) {
int utf8Offset = this.constantPoolOffsets[this.innerNameIndex] - this.structOffset;
this.innerName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
}
+ this.readInnerName = true;
}
return this.innerName;
}

Back to the top