Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2016-04-26 16:20:41 +0000
committerStephan Herrmann2016-04-26 16:20:41 +0000
commitf94f06210f55d104fb369525b631ce6c84dc8ae5 (patch)
treea09d4ae0553a16820eb061027c916e4ecc3b1c91 /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt
parent4f144506a9170dea5636190118cad1fc2545e444 (diff)
downloadorg.eclipse.objectteams-f94f06210f55d104fb369525b631ce6c84dc8ae5.tar.gz
org.eclipse.objectteams-f94f06210f55d104fb369525b631ce6c84dc8ae5.tar.xz
org.eclipse.objectteams-f94f06210f55d104fb369525b631ce6c84dc8ae5.zip
Releng: update jdt.core to I20160426-1045 (warmup towards M7)
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/ExternalAnnotationProvider.java8
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java12
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java7
3 files changed, 20 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java
index f58c49c5c..cf7b55cd9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ExternalAnnotationProvider.java
@@ -446,8 +446,14 @@ public class ExternalAnnotationProvider {
while (i < length && this.source[i] == Util.C_ARRAY)
i++;
if (i < length && this.source[i] == Util.C_RESOLVED) {
- while (i < length && this.source[i] != Util.C_NAME_END)
+ int currentdepth = depth;
+ while (i < length && (currentdepth != depth || this.source[i] != Util.C_NAME_END)) {
+ if(this.source[i] == Util.C_GENERIC_START)
+ currentdepth++;
+ if(this.source[i] == Util.C_GENERIC_END)
+ currentdepth--;
i++;
+ }
}
i--; // unget
break;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
index bc567bbab..5f549afe6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -278,16 +278,16 @@ public Object getWrappedConstantValue() {
Constant fieldConstant = getConstant();
switch (fieldConstant.typeID()) {
case TypeIds.T_int :
- this.wrappedConstantValue = new Integer(fieldConstant.intValue());
+ this.wrappedConstantValue = Integer.valueOf(fieldConstant.intValue());
break;
case TypeIds.T_byte :
- this.wrappedConstantValue = new Byte(fieldConstant.byteValue());
+ this.wrappedConstantValue = Byte.valueOf(fieldConstant.byteValue());
break;
case TypeIds.T_short :
- this.wrappedConstantValue = new Short(fieldConstant.shortValue());
+ this.wrappedConstantValue = Short.valueOf(fieldConstant.shortValue());
break;
case TypeIds.T_char :
- this.wrappedConstantValue = new Character(fieldConstant.charValue());
+ this.wrappedConstantValue = Character.valueOf(fieldConstant.charValue());
break;
case TypeIds.T_float :
this.wrappedConstantValue = new Float(fieldConstant.floatValue());
@@ -299,7 +299,7 @@ public Object getWrappedConstantValue() {
this.wrappedConstantValue = Util.toBoolean(fieldConstant.booleanValue());
break;
case TypeIds.T_long :
- this.wrappedConstantValue = new Long(fieldConstant.longValue());
+ this.wrappedConstantValue = Long.valueOf(fieldConstant.longValue());
break;
case TypeIds.T_JavaLangString :
this.wrappedConstantValue = fieldConstant.stringValue();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java
index f6092ac9c..cb13247bc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/NonNullDefaultAwareTypeAnnotationWalker.java
@@ -122,6 +122,13 @@ public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalke
}
@Override
+ public ITypeAnnotationWalker toField() {
+ // don't set nextIsDefaultLocation, because field-level nullness is handled by BinaryTypeBinding.scanFieldForNullAnnotation
+ if (this.isEmpty) return restrict(this.matches, this.pathPtr);
+ return super.toField();
+ }
+
+ @Override
public ITypeAnnotationWalker toMethodReturn() {
// don't set nextIsDefaultLocation, because signature-level nullness is handled by ImplicitNullAnnotationVerifier (triggered per invocation via MessageSend.resolveType() et al)
if (this.isEmpty) return restrict(this.matches, this.pathPtr);

Back to the top