Index: .settings/org.eclipse.jdt.core.prefs =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs,v --- .settings/org.eclipse.jdt.core.prefs 1.12 +++ .settings/org.eclipse.jdt.core.prefs @@ -1,1 +1,1 @@ -#Thu Nov 01 22:46:18 EDT 2007 --- +#Fri Jan 04 23:22:13 CET 2008 Index: .settings/org.eclipse.jdt.ui.prefs =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/.settings/org.eclipse.jdt.ui.prefs,v --- .settings/org.eclipse.jdt.ui.prefs 1.3 +++ .settings/org.eclipse.jdt.ui.prefs @@ -1,1 +1,1 @@ -#Mon Mar 05 01:19:14 CET 2007 --- +#Fri Jan 04 23:22:13 CET 2008 @@ -50,0 +50,1 @@ +org.eclipse.jdt.ui.text.custom_code_templates= Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v --- compiler/org/eclipse/jdt/core/compiler/IProblem.java 1.196 +++ compiler/org/eclipse/jdt/core/compiler/IProblem.java @@ -1309,0 +1309,7 @@ + + int LocalCannotBeAssignedPotentiallyNull = Internal + 903; + int CannotPassPotentiallyNullExpressionAsArgument = Internal + 904; + int CannotReturnPotentiallyNullExpression = Internal + 905; + int NonNullAnnotationIsMissingForOverridingMethod = Internal + 906; + int NonNullAnnotationIsMissingForArgumentInOverridingMethod = Internal + 907; + Index: compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java 1.89 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java @@ -18,0 +18,1 @@ +import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; @@ -19,0 +20,1 @@ +import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities; @@ -723,0 +725,24 @@ +/** + * Return true if ab contains + * a non-null annotation. + */ +public static boolean isNonNullAnnotated(Scope currentScope, AnnotationBinding[] ab) { + if (ab == null || ab.length == 0) + return false; + if (currentScope.compilerOptions().getSeverity(CompilerOptions.NullReference) != ProblemSeverities.Ignore) { + // TODO: use lazy creation + char[][] annotations = CharOperation.splitOn(';', currentScope.compilerOptions().nonNullAnnotations.toCharArray()); + for (int i = 0; i < ab.length; i++) { + if (ab[i] != null) { + for (int j = 0; j < annotations.length; j++) { + char[] annotation = ab[i].getAnnotationType().readableName(); + if (CharOperation.compareTo(annotation, annotations[j]) == 0) { + return true; + } + } + } + } + } + return false; +} + Index: compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java 1.80 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java @@ -25,1 +25,2 @@ - --- + private boolean isNonNull; + @@ -34,0 +35,1 @@ + this.isNonNull = false; @@ -36,0 +38,1 @@ + @@ -47,0 +50,2 @@ + if (isNonNull && nullStatus != FlowInfo.NON_NULL) + local.declaringScope.problemReporter().localCannotBeAssignedWithPotentiallyNull(local, expression); @@ -60,1 +65,4 @@ - flowInfo.markAsDefinitelyUnknown(local); --- + if (isNonNull) + flowInfo.markAsDefinitelyNonNull(local); + else + flowInfo.markAsDefinitelyUnknown(local); @@ -71,1 +79,4 @@ - flowContext.initsOnFinally.markAsDefinitelyUnknown(local); --- + if (isNonNull) + flowContext.initsOnFinally.markAsDefinitelyNonNull(local); + else + flowContext.initsOnFinally.markAsDefinitelyUnknown(local); @@ -156,0 +167,2 @@ + if (isNonNull) + return FlowInfo.NON_NULL; @@ -202,0 +215,7 @@ + // check for NonNull annotation + LocalVariableBinding local = this.lhs.localVariableBinding(); + if (local != null && local.kind() == Binding.LOCAL + && (local.type.tagBits & TagBits.IsBaseType) == 0) { + isNonNull = isNonNullAnnotated(scope, local.getAnnotations()); + } + Index: compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java 1.69 +++ compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java @@ -31,0 +31,12 @@ + // TODO: if allowed, simpler check would be for left and right nullStatus equality (for != UNKNOW) + Expression tmp = left; + while (tmp instanceof CastExpression) + tmp = ((CastExpression)tmp).expression; + if (tmp instanceof MessageSend) { + MessageSend ms = (MessageSend)tmp; + int rightNullStatus = right.nullStatus(flowInfo); + if ((rightNullStatus == FlowInfo.NULL + || rightNullStatus == FlowInfo.NON_NULL) + && isNonNullAnnotated(scope, ms.binding.getAnnotations())) + scope.problemReporter().cannotReturnPotentiallyNullExpression(left); + } @@ -35,0 +47,11 @@ + tmp = right; + while (tmp instanceof CastExpression) + tmp = ((CastExpression)tmp).expression; + if (tmp instanceof MessageSend) { + MessageSend ms = (MessageSend)tmp; + int rightNullStatus = left.nullStatus(flowInfo); + if ((rightNullStatus == FlowInfo.NULL + || rightNullStatus == FlowInfo.NON_NULL) + && isNonNullAnnotated(scope, ms.binding.getAnnotations())) + scope.problemReporter().cannotReturnPotentiallyNullExpression(right); + } Index: compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java 1.62 +++ compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java @@ -65,0 +65,2 @@ + if (isNonNullAnnotated(currentScope, binding.getAnnotations()) && nullStatus != FlowInfo.NON_NULL) + binding.declaringScope.problemReporter().localCannotBeAssignedWithPotentiallyNull(binding, initialization); Index: compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 1.126 +++ compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java @@ -23,0 +23,1 @@ +import org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding; @@ -42,1 +43,1 @@ - --- + @@ -58,1 +59,3 @@ - --- + + private boolean isReturnValueNonNull = false; + @@ -69,0 +72,1 @@ + final AnnotationBinding[][] parameterAnnotations = binding.getParameterAnnotations(); @@ -71,0 +75,5 @@ + + if (arguments[i].nullStatus(flowInfo) != FlowInfo.NON_NULL + && isNonNullAnnotated(currentScope, parameterAnnotations[i])) { + currentScope.problemReporter().cannotPassPotentiallyNullExpressionAsArgument(binding, arguments[i]); + } @@ -77,1 +86,1 @@ - // TODO (maxime) the copy above is needed because of a side effect into --- + // TODO (maxime) the copy above is needed because of a side effect into @@ -81,1 +90,1 @@ - manageSyntheticAccessIfNecessary(currentScope, flowInfo); --- + manageSyntheticAccessIfNecessary(currentScope, flowInfo); @@ -95,1 +104,1 @@ - if (originalBinding != this.binding --- + if (originalBinding != this.binding @@ -99,1 +108,1 @@ - TypeBinding targetType = (!compileTimeType.isBaseType() && runtimeTimeType.isBaseType()) --- + TypeBinding targetType = (!compileTimeType.isBaseType() && runtimeTimeType.isBaseType()) @@ -103,1 +112,1 @@ - } else if (this.actualReceiverType.isArrayType() --- + } else if (this.actualReceiverType.isArrayType() @@ -105,2 +114,2 @@ - && this.binding.parameters == Binding.NO_PARAMETERS - && scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5 --- + && this.binding.parameters == Binding.NO_PARAMETERS + && scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5 @@ -109,1 +118,1 @@ - this.valueCast = runtimeTimeType; --- + this.valueCast = runtimeTimeType; @@ -114,1 +123,1 @@ - scope.problemReporter().invalidType(this, --- + scope.problemReporter().invalidType(this, @@ -120,1 +129,1 @@ - } --- + } @@ -131,1 +140,1 @@ - */ --- + */ @@ -143,1 +152,1 @@ - ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((this.bits & ASTNode.DepthMASK) >> ASTNode.DepthSHIFT); --- + ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((this.bits & ASTNode.DepthMASK) >> ASTNode.DepthSHIFT); @@ -148,1 +157,1 @@ - if (this.receiverGenericCast != null) --- + if (this.receiverGenericCast != null) @@ -151,1 +160,1 @@ - --- + @@ -201,1 +210,1 @@ -} --- +} @@ -203,1 +212,1 @@ -public boolean isSuperAccess() { --- +public boolean isSuperAccess() { @@ -206,1 +215,1 @@ -public boolean isTypeAccess() { --- +public boolean isTypeAccess() { @@ -217,1 +226,1 @@ - // depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy) --- + // depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy) @@ -219,1 +228,1 @@ - --- + @@ -236,2 +245,2 @@ - if (((this.bits & ASTNode.DepthMASK) != 0) - && this.codegenBinding.declaringClass.getPackage() --- + if (((this.bits & ASTNode.DepthMASK) != 0) + && this.codegenBinding.declaringClass.getPackage() @@ -246,1 +255,1 @@ - --- + @@ -250,1 +259,1 @@ - // and not from Object or implicit static method call. --- + // and not from Object or implicit static method call. @@ -263,1 +272,1 @@ - // Post 1.4.0 target, array clone() invocations are qualified with array type --- + // Post 1.4.0 target, array clone() invocations are qualified with array type @@ -268,0 +277,2 @@ + if (isReturnValueNonNull) + return FlowInfo.NON_NULL; @@ -276,1 +287,1 @@ - if (this.valueCast != null) --- + if (this.valueCast != null) @@ -305,1 +316,1 @@ - } --- + } @@ -311,1 +322,1 @@ - --- + @@ -313,1 +324,1 @@ - --- + @@ -327,1 +338,1 @@ - for (int i = 0; i < this.arguments.length ; i ++) { --- + for (int i = 0; i < this.arguments.length ; i ++) { @@ -340,1 +351,1 @@ - boolean receiverCast = false, argsContainCast = false; --- + boolean receiverCast = false, argsContainCast = false; @@ -345,1 +356,1 @@ - this.actualReceiverType = this.receiver.resolveType(scope); --- + this.actualReceiverType = this.receiver.resolveType(scope); @@ -349,2 +360,2 @@ - if (((CastExpression)this.receiver).expression.resolvedType == this.actualReceiverType) { - scope.problemReporter().unnecessaryCast((CastExpression)this.receiver); --- + if (((CastExpression)this.receiver).expression.resolvedType == this.actualReceiverType) { + scope.problemReporter().unnecessaryCast((CastExpression)this.receiver); @@ -370,1 +381,1 @@ - } --- + } @@ -374,1 +385,1 @@ - boolean argHasError = false; // typeChecks all arguments --- + boolean argHasError = false; // typeChecks all arguments @@ -393,1 +404,1 @@ - this.binding = --- + this.binding = @@ -425,1 +436,1 @@ - this.binding = --- + this.binding = @@ -428,1 +439,1 @@ - : scope.getMethod(this.actualReceiverType, this.selector, argumentTypes, this); --- + : scope.getMethod(this.actualReceiverType, this.selector, argumentTypes, this); @@ -433,1 +444,1 @@ - } else { --- + } else { @@ -455,1 +466,1 @@ - MethodBinding closestMatchOriginal = closestMatch.original(); --- + MethodBinding closestMatchOriginal = closestMatch.original(); @@ -468,2 +479,2 @@ - if (this.actualReceiverType.isRawType() - && (this.receiver.bits & ASTNode.IgnoreRawTypeCheck) == 0 --- + if (this.actualReceiverType.isRawType() + && (this.receiver.bits & ASTNode.IgnoreRawTypeCheck) == 0 @@ -490,1 +501,1 @@ - } --- + } @@ -505,3 +516,3 @@ - if (this.actualReceiverType.isArrayType() - && this.binding.parameters == Binding.NO_PARAMETERS - && compilerOptions.complianceLevel >= ClassFileConstants.JDK1_5 --- + if (this.actualReceiverType.isArrayType() + && this.binding.parameters == Binding.NO_PARAMETERS + && compilerOptions.complianceLevel >= ClassFileConstants.JDK1_5 @@ -530,0 +541,4 @@ + + if (isNonNullAnnotated(scope, binding.getAnnotations())) + isReturnValueNonNull = true; + @@ -560,1 +575,1 @@ - } --- + } Index: compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java 1.63 +++ compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java @@ -21,0 +21,1 @@ +import org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding; @@ -23,0 +24,2 @@ +import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; +import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; @@ -31,1 +34,1 @@ - --- + @@ -34,1 +37,1 @@ - --- + @@ -53,3 +56,3 @@ - - if (!this.binding.isUsed() && - (this.binding.isPrivate() --- + + if (!this.binding.isUsed() && + (this.binding.isPrivate() @@ -61,1 +64,1 @@ - --- + @@ -69,1 +72,33 @@ - --- + + boolean[] argumentIsNonNull = null; + if (arguments != null) + argumentIsNonNull = new boolean[arguments.length]; + + ReferenceBinding declaringClassRef = binding.declaringClass; + + if ((returnType.bits & TagBits.IsBaseType) == 0) { + + ReferenceBinding type = isOverriddenMethodNonNullAnnotated(declaringClassRef, -1, classScope); + if (type != null && !isNonNullAnnotated(classScope, binding.getAnnotations())) + classScope.problemReporter().nonNullAnnotationIsMissingForOverridingMethod(type, binding, this); + } + + final AnnotationBinding[][] parameterAnnotations = binding.getParameterAnnotations(); + if (arguments != null) { + for (int i = 0; i < arguments.length; i++) { + ReferenceBinding type = isOverriddenMethodNonNullAnnotated(declaringClassRef, i, classScope); + boolean argIsNonNull = isNonNullAnnotated(classScope, parameterAnnotations[i]); + if (type != null && !argIsNonNull) + classScope.problemReporter().nonNullAnnotationIsMissingForArgumentInOverridingMethod(type, binding, arguments[i]); + + argumentIsNonNull[i] = type != null || argIsNonNull; + } + } + + if (argumentIsNonNull != null) { + for (int i = 0; i < argumentIsNonNull.length; i++) { + if (!argumentIsNonNull[i] && isNonNullAnnotated(classScope, parameterAnnotations[i])) + argumentIsNonNull[i] = true; + } + } + @@ -82,0 +117,2 @@ + if (argumentIsNonNull[i]) + flowInfo.markAsDefinitelyNonNull(this.arguments[i].binding); @@ -103,1 +140,1 @@ - if (flowInfo != FlowInfo.DEAD_END) { --- + if (flowInfo != FlowInfo.DEAD_END) { @@ -116,0 +153,71 @@ + + /** + * Check all the overridden methods (super classes and interfaces) + * searching for NonNull annotation. Return the first type which + * contains an annotated overridden method. + * + * @param declaringClassRef the base type + * @param argument if positive, search annotations on parameters, else + * search on method + * @param classScope + * @return the type containing the overridden and annotated method + * or null + */ + public ReferenceBinding isOverriddenMethodNonNullAnnotated(ReferenceBinding declaringClassRef, int argument, ClassScope classScope) { + if (declaringClassRef == null) + return null; + + if (binding.isPrivate() || binding.isConstructor()) + return null; + + ReferenceBinding superClassRef = declaringClassRef.superclass(); + if (superClassRef != null) { + MethodBinding mb = superClassRef.getExactMethod(selector, binding.parameters, classScope.compilationUnitScope()); + + if (mb != null) { + boolean nonNullAnnotated; + if (argument < 0) + nonNullAnnotated = isNonNullAnnotated(classScope, mb.getAnnotations()); + else + nonNullAnnotated = isNonNullAnnotated(classScope, mb.getParameterAnnotations()[argument]); + + // if an annotation is found, returns + if (nonNullAnnotated) + return superClassRef; + } else { + ReferenceBinding type = isOverriddenMethodNonNullAnnotated(superClassRef, argument, classScope); + if (type != null) + return type; + } + } + + // if an overridden method have been found, but it was not annotated + // the check continues through the interfaces + + ReferenceBinding[] superInterfacesRef = declaringClassRef.superInterfaces(); + if (superInterfacesRef != null) { + for (int i = 0; i < superInterfacesRef.length; i++) { + if (superInterfacesRef[i] != null) { + MethodBinding mb = superInterfacesRef[i].getExactMethod(selector, binding.parameters, classScope.compilationUnitScope()); + + if (mb != null) { + boolean nonNullAnnotated; + if (argument < 0) + nonNullAnnotated = isNonNullAnnotated(classScope, mb.getAnnotations()); + else + nonNullAnnotated = isNonNullAnnotated(classScope, mb.getParameterAnnotations()[argument]); + + if (nonNullAnnotated) + return superInterfacesRef[i]; + } else { + ReferenceBinding type = isOverriddenMethodNonNullAnnotated(superInterfacesRef[i], argument, classScope); + if (type != null) + return type; + } + } + } + } + + return null; + } + @@ -140,1 +248,1 @@ - --- + @@ -146,1 +254,1 @@ - --- + @@ -167,1 +275,1 @@ - } else if (!isInterfaceMethod --- + } else if (!isInterfaceMethod @@ -173,1 +281,1 @@ - --- + @@ -181,1 +289,1 @@ - // native methods may have a semicolon body --- + // native methods may have a semicolon body @@ -187,1 +295,1 @@ - // the method HAS a body --> abstract native modifiers are forbiden --- + // the method HAS a body --> abstract native modifiers are forbidden @@ -193,1 +301,1 @@ - --- + @@ -224,1 +332,1 @@ - } --- + } @@ -247,1 +355,1 @@ - } --- + } Index: compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java 1.59 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java @@ -40,0 +40,8 @@ + + AbstractMethodDeclaration methodDecl = currentScope.methodScope().referenceMethod(); + MethodBinding methodBinding = methodDecl.binding; + + if ((methodBinding.returnType.tagBits & TagBits.IsBaseType) == 0 + && expression.nullStatus(flowInfo) != FlowInfo.NON_NULL + && isNonNullAnnotated(currentScope, methodBinding.getAnnotations())) + currentScope.problemReporter().cannotReturnPotentiallyNullExpression(expression); Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v --- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 1.196 +++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java @@ -120,0 +120,1 @@ + public static final String OPTION_Non_Null_Annotations = "org.eclipse.jdt.core.compiler.nonNullAnnotations"; //$NON-NLS-1$ @@ -340,0 +341,3 @@ + // annotations list for null checks (separator is ';') + public String nonNullAnnotations = "org.NonNull;edu.umd.cs.findbugs.annotations.NonNull"; //$NON-NLS-1$ + @@ -458,0 +462,1 @@ + optionsMap.put(OPTION_Non_Null_Annotations, this.nonNullAnnotations); @@ -750,1 +755,1 @@ - } --- + } @@ -937,1 +942,1 @@ - } --- + } @@ -940,1 +945,1 @@ - } --- + } @@ -976,0 +981,3 @@ + if ((optionValue = optionsMap.get(OPTION_Non_Null_Annotations)) != null) { + this.nonNullAnnotations = (String)optionValue; + } @@ -1063,0 +1071,1 @@ + buf.append("\n\t- non null annotations list (';'): ").append(this.nonNullAnnotations); //$NON-NLS-1$ Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v --- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 1.365 +++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java @@ -33,1 +33,1 @@ - --- + @@ -49,1 +49,1 @@ - case IProblem.MaskedCatch : --- + case IProblem.MaskedCatch : @@ -54,1 +54,1 @@ - --- + @@ -57,1 +57,1 @@ - --- + @@ -65,2 +65,2 @@ - case IProblem.OverridingDeprecatedMethod : - case IProblem.UsingDeprecatedType : --- + case IProblem.OverridingDeprecatedMethod : + case IProblem.UsingDeprecatedType : @@ -71,1 +71,1 @@ - --- + @@ -74,1 +74,1 @@ - --- + @@ -84,1 +84,1 @@ - case IProblem.NeedToEmulateConstructorAccess : --- + case IProblem.NeedToEmulateConstructorAccess : @@ -93,1 +93,1 @@ - --- + @@ -130,1 +130,1 @@ - --- + @@ -140,1 +140,1 @@ - --- + @@ -144,1 +144,1 @@ - --- + @@ -147,1 +147,1 @@ - --- + @@ -154,1 +154,1 @@ - --- + @@ -174,1 +174,1 @@ - --- + @@ -179,1 +179,1 @@ - --- + @@ -185,1 +185,1 @@ - --- + @@ -201,1 +201,1 @@ - --- + @@ -209,1 +209,1 @@ - --- + @@ -216,1 +216,1 @@ - --- + @@ -219,1 +219,1 @@ - --- + @@ -225,1 +225,1 @@ - --- + @@ -307,1 +307,1 @@ - --- + @@ -310,1 +310,1 @@ - --- + @@ -317,0 +317,7 @@ + + case IProblem.LocalCannotBeAssignedPotentiallyNull: + case IProblem.CannotReturnPotentiallyNullExpression: + case IProblem.CannotPassPotentiallyNullExpressionAsArgument: + case IProblem.NonNullAnnotationIsMissingForOverridingMethod: + case IProblem.NonNullAnnotationIsMissingForArgumentInOverridingMethod: + return CompilerOptions.NullReference; @@ -343,1 +350,1 @@ - --- + @@ -351,1 +358,1 @@ - --- + @@ -357,1 +364,1 @@ - --- + @@ -366,1 +373,1 @@ - --- + @@ -369,1 +376,1 @@ - --- + @@ -372,1 +379,1 @@ - --- + @@ -375,1 +382,1 @@ - --- + @@ -381,1 +388,1 @@ - --- + @@ -384,1 +391,1 @@ - --- + @@ -399,1 +406,1 @@ - --- + @@ -403,1 +410,1 @@ - case (int)(CompilerOptions.PotentialNullReference >>> 32): --- + case (int)(CompilerOptions.PotentialNullReference >>> 32): @@ -409,1 +416,1 @@ - --- + @@ -412,1 +419,1 @@ - --- + @@ -422,1 +429,1 @@ - --- + @@ -429,1 +436,1 @@ - } --- + } @@ -436,1 +443,1 @@ - --- + @@ -471,1 +478,1 @@ - new String(type.sourceName()), --- + new String(type.sourceName()), @@ -478,1 +485,1 @@ - new String(type.sourceName()), --- + new String(type.sourceName()), @@ -505,1 +512,1 @@ - new String[] { --- + new String[] { @@ -507,2 +514,2 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), - new String(decl.name), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), + new String(decl.name), @@ -510,1 +517,1 @@ - new String[] { --- + new String[] { @@ -512,2 +519,2 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), - new String(decl.name), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), + new String(decl.name), @@ -522,1 +529,1 @@ - new String[] { --- + new String[] { @@ -524,3 +531,3 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), - new String(abstractMethod.declaringClass.readableName()), - new String(type.readableName()), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), + new String(abstractMethod.declaringClass.readableName()), + new String(type.readableName()), @@ -528,1 +535,1 @@ - new String[] { --- + new String[] { @@ -530,3 +537,3 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), - new String(abstractMethod.declaringClass.shortReadableName()), - new String(type.shortReadableName()), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), + new String(abstractMethod.declaringClass.shortReadableName()), + new String(type.shortReadableName()), @@ -564,1 +571,1 @@ - new String(inheritedMethod.selector), --- + new String(inheritedMethod.selector), @@ -569,1 +576,1 @@ - new String(inheritedMethod.selector), --- + new String(inheritedMethod.selector), @@ -572,1 +579,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -736,1 +743,1 @@ - String[] arguments = new String[] { new String(name) }; --- + String[] arguments = new String[] { new String(name) }; @@ -901,1 +908,1 @@ - new String[] { --- + new String[] { @@ -903,1 +910,1 @@ - typesAsString(enumConstructor.isVarargs(), enumConstructor.parameters, false), --- + typesAsString(enumConstructor.isVarargs(), enumConstructor.parameters, false), @@ -905,1 +912,1 @@ - new String[] { --- + new String[] { @@ -907,1 +914,1 @@ - typesAsString(enumConstructor.isVarargs(), enumConstructor.parameters, true), --- + typesAsString(enumConstructor.isVarargs(), enumConstructor.parameters, true), @@ -986,1 +993,1 @@ - nodeSourceEnd(field, location)); --- + nodeSourceEnd(field, location)); @@ -1061,1 +1068,1 @@ - --- + @@ -1102,1 +1109,1 @@ - return ProblemSeverities.Ignore; --- + return ProblemSeverities.Ignore; @@ -1125,1 +1132,1 @@ - return ProblemSeverities.Ignore; --- + return ProblemSeverities.Ignore; @@ -1144,1 +1151,1 @@ - if ((problemID & IProblem.Javadoc) != 0 && !this.options.docCommentSupport) --- + if ((problemID & IProblem.Javadoc) != 0 && !this.options.docCommentSupport) @@ -1169,1 +1176,1 @@ - // this code is called on IntLiteral and LongLiteral --- + // this code is called on IntLiteral and LongLiteral @@ -1206,1 +1213,1 @@ - --- + @@ -1365,1 +1372,1 @@ - typesAsString(inheritedMethod1.isVarargs(), inheritedMethod1.original().parameters, false), --- + typesAsString(inheritedMethod1.isVarargs(), inheritedMethod1.original().parameters, false), @@ -1370,1 +1377,1 @@ - typesAsString(inheritedMethod1.isVarargs(), inheritedMethod1.original().parameters, true), --- + typesAsString(inheritedMethod1.isVarargs(), inheritedMethod1.original().parameters, true), @@ -1469,1 +1476,1 @@ - ? IProblem.DuplicateModifierForArgument --- + ? IProblem.DuplicateModifierForArgument @@ -1505,1 +1512,1 @@ - nodeSourceEnd(field, reference)); --- + nodeSourceEnd(field, reference)); @@ -1532,1 +1539,1 @@ - sourceEnd); --- + sourceEnd); @@ -1540,1 +1547,1 @@ - new String[] { --- + new String[] { @@ -1542,2 +1549,2 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), - new String(abstractMethod.declaringClass.readableName()), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), + new String(abstractMethod.declaringClass.readableName()), @@ -1545,1 +1552,1 @@ - new String[] { --- + new String[] { @@ -1547,2 +1554,2 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), - new String(abstractMethod.declaringClass.shortReadableName()), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), + new String(abstractMethod.declaringClass.shortReadableName()), @@ -1557,1 +1564,1 @@ - new String[] { --- + new String[] { @@ -1559,2 +1566,2 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), - new String(field.name), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, false), + new String(field.name), @@ -1562,1 +1569,1 @@ - new String[] { --- + new String[] { @@ -1564,2 +1571,2 @@ - typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), - new String(field.name), --- + typesAsString(abstractMethod.isVarargs(), abstractMethod.parameters, true), + new String(field.name), @@ -1592,1 +1599,1 @@ - nodeSourceEnd(field, reference)); --- + nodeSourceEnd(field, reference)); @@ -1705,1 +1712,1 @@ -/** @param classpathEntryType one of {@link AccessRestriction#COMMAND_LINE}, --- +/** @param classpathEntryType one of {@link AccessRestriction#COMMAND_LINE}, @@ -1707,1 +1714,1 @@ -public void forbiddenReference(FieldBinding field, ASTNode location, --- +public void forbiddenReference(FieldBinding field, ASTNode location, @@ -1715,2 +1722,2 @@ - new String[] { - classpathEntryName, --- + new String[] { + classpathEntryName, @@ -1723,1 +1730,1 @@ -/** @param classpathEntryType one of {@link AccessRestriction#COMMAND_LINE}, --- +/** @param classpathEntryType one of {@link AccessRestriction#COMMAND_LINE}, @@ -1725,1 +1732,1 @@ -public void forbiddenReference(MethodBinding method, ASTNode location, --- +public void forbiddenReference(MethodBinding method, ASTNode location, @@ -1728,1 +1735,1 @@ - if (severity == ProblemSeverities.Ignore) return; --- + if (severity == ProblemSeverities.Ignore) return; @@ -1734,2 +1741,2 @@ - new String[] { - classpathEntryName, --- + new String[] { + classpathEntryName, @@ -1745,2 +1752,2 @@ - new String[] { - classpathEntryName, --- + new String[] { + classpathEntryName, @@ -1753,1 +1760,1 @@ -/** @param classpathEntryType one of {@link AccessRestriction#COMMAND_LINE}, --- +/** @param classpathEntryType one of {@link AccessRestriction#COMMAND_LINE}, @@ -1755,1 +1762,1 @@ -public void forbiddenReference(TypeBinding type, ASTNode location, --- +public void forbiddenReference(TypeBinding type, ASTNode location, @@ -1765,1 +1772,1 @@ - classpathEntryName, --- + classpathEntryName, @@ -1800,1 +1807,1 @@ - int problemId, --- + int problemId, @@ -1803,1 +1810,1 @@ - int problemStartPosition, --- + int problemStartPosition, @@ -1812,2 +1819,2 @@ - this.referenceContext, - this.referenceContext == null ? null : this.referenceContext.compilationResult()); --- + this.referenceContext, + this.referenceContext == null ? null : this.referenceContext.compilationResult()); @@ -1817,1 +1824,1 @@ -// reference context. --- +// reference context. @@ -1819,1 +1826,1 @@ - int problemId, --- + int problemId, @@ -1822,1 +1829,1 @@ - int problemStartPosition, --- + int problemStartPosition, @@ -1832,2 +1839,2 @@ - this.referenceContext, - unitResult); --- + this.referenceContext, + unitResult); @@ -1840,1 +1847,1 @@ - int problemId, --- + int problemId, @@ -1844,1 +1851,1 @@ - int problemStartPosition, --- + int problemStartPosition, @@ -1854,1 +1861,1 @@ - problemEndPosition); --- + problemEndPosition); @@ -1860,1 +1867,1 @@ - int problemId, --- + int problemId, @@ -1865,1 +1872,1 @@ - int problemStartPosition, --- + int problemStartPosition, @@ -1875,2 +1882,2 @@ - this.referenceContext, - this.referenceContext == null ? null : this.referenceContext.compilationResult()); --- + this.referenceContext, + this.referenceContext == null ? null : this.referenceContext.compilationResult()); @@ -1885,1 +1892,1 @@ - }, --- + }, @@ -1888,1 +1895,1 @@ - }, --- + }, @@ -1946,1 +1953,1 @@ - arguments, --- + arguments, @@ -1956,1 +1963,1 @@ - arguments, --- + arguments, @@ -1964,2 +1971,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -1972,2 +1979,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -2004,1 +2011,1 @@ - --- + @@ -2009,1 +2016,1 @@ - problemID = IProblem.CannotDefineAnnotationInLocalType; --- + problemID = IProblem.CannotDefineAnnotationInLocalType; @@ -2011,1 +2018,1 @@ - problemID = IProblem.CannotDefineInterfaceInLocalType; --- + problemID = IProblem.CannotDefineInterfaceInLocalType; @@ -2049,1 +2056,1 @@ - }, --- + }, @@ -2053,1 +2060,1 @@ - }, --- + }, @@ -2063,1 +2070,1 @@ - }, --- + }, @@ -2067,1 +2074,1 @@ - }, --- + }, @@ -2120,2 +2127,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -2151,1 +2158,1 @@ - }, --- + }, @@ -2155,1 +2162,1 @@ - }, --- + }, @@ -2166,1 +2173,1 @@ - }, --- + }, @@ -2171,1 +2178,1 @@ - }, --- + }, @@ -2227,1 +2234,1 @@ - }, --- + }, @@ -2232,1 +2239,1 @@ - }, --- + }, @@ -2261,1 +2268,1 @@ - qualifiedTypeReference.sourceEnd); --- + qualifiedTypeReference.sourceEnd); @@ -2285,1 +2292,1 @@ - qualifiedTypeReference.sourceEnd); --- + qualifiedTypeReference.sourceEnd); @@ -2378,4 +2385,4 @@ - IProblem.ImportNotFound, - arguments, - arguments, - importRef.sourceStart, --- + IProblem.ImportNotFound, + arguments, + arguments, + importRef.sourceStart, @@ -2389,4 +2396,4 @@ - IProblem.InvalidTypeForStaticImport, - arguments, - arguments, - importRef.sourceStart, --- + IProblem.InvalidTypeForStaticImport, + arguments, + arguments, + importRef.sourceStart, @@ -2401,1 +2408,1 @@ - if (currentMethod.declaringClass.isInterface() --- + if (currentMethod.declaringClass.isInterface() @@ -2427,1 +2434,1 @@ - } else --- + } else @@ -2474,1 +2481,1 @@ - if (declaringClass.isInterface() --- + if (declaringClass.isInterface() @@ -2659,1 +2666,1 @@ - }, --- + }, @@ -2666,1 +2673,1 @@ - }, --- + }, @@ -2721,1 +2728,1 @@ - --- + @@ -2730,1 +2737,1 @@ -} --- +} @@ -2732,1 +2739,1 @@ - boolean insideDefaultConstructor = --- + boolean insideDefaultConstructor = @@ -2748,1 +2755,1 @@ - --- + @@ -2772,1 +2779,1 @@ - } --- + } @@ -2794,1 +2801,1 @@ - new String[] { --- + new String[] { @@ -2796,5 +2803,5 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), - typesAsString(false, invocationArguments, false), - new String(inferredTypeArgument.readableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), + typesAsString(false, invocationArguments, false), + new String(inferredTypeArgument.readableName()), + new String(typeParameter.sourceName), @@ -2802,1 +2809,1 @@ - new String[] { --- + new String[] { @@ -2804,5 +2811,5 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), - typesAsString(false, invocationArguments, true), - new String(inferredTypeArgument.shortReadableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), + typesAsString(false, invocationArguments, true), + new String(inferredTypeArgument.shortReadableName()), + new String(typeParameter.sourceName), @@ -2811,3 +2818,3 @@ - sourceEnd); - return; - --- + sourceEnd); + return; + @@ -2820,1 +2827,1 @@ - new String[] { --- + new String[] { @@ -2822,2 +2829,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -2825,1 +2832,1 @@ - new String[] { --- + new String[] { @@ -2827,2 +2834,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -2831,1 +2838,1 @@ - sourceEnd); --- + sourceEnd); @@ -2835,1 +2842,1 @@ - new String[] { --- + new String[] { @@ -2837,2 +2844,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -2841,1 +2848,1 @@ - new String[] { --- + new String[] { @@ -2843,2 +2850,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -2848,1 +2855,1 @@ - sourceEnd); --- + sourceEnd); @@ -2856,1 +2863,1 @@ - new String[] { --- + new String[] { @@ -2858,2 +2865,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -2862,1 +2869,1 @@ - new String[] { --- + new String[] { @@ -2864,2 +2871,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -2869,1 +2876,1 @@ - sourceEnd); --- + sourceEnd); @@ -2876,1 +2883,1 @@ - new String[] { --- + new String[] { @@ -2878,2 +2885,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -2881,1 +2888,1 @@ - new String[] { --- + new String[] { @@ -2883,2 +2890,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -2887,1 +2894,1 @@ - sourceEnd); --- + sourceEnd); @@ -2914,1 +2921,1 @@ - --- + @@ -2943,1 +2950,1 @@ - --- + @@ -2961,1 +2968,1 @@ - --- + @@ -3000,1 +3007,1 @@ - --- + @@ -3079,1 +3086,1 @@ - --- + @@ -3081,1 +3088,1 @@ - --- + @@ -3113,1 +3120,1 @@ - nodeSourceStart(field, nameRef), --- + nodeSourceStart(field, nameRef), @@ -3143,1 +3150,1 @@ - id, --- + id, @@ -3146,1 +3153,1 @@ - nameRef.sourceStart, --- + nameRef.sourceStart, @@ -3155,1 +3162,1 @@ - annotation.sourceEnd); --- + annotation.sourceEnd); @@ -3160,1 +3167,1 @@ - --- + @@ -3179,1 +3186,1 @@ - parameterTypeNames --- + parameterTypeNames @@ -3190,1 +3197,1 @@ - } --- + } @@ -3197,1 +3204,1 @@ - } --- + } @@ -3230,1 +3237,1 @@ - new String[] { --- + new String[] { @@ -3232,5 +3239,5 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), - typesAsString(false, invocationArguments, false), - new String(inferredTypeArgument.readableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), + typesAsString(false, invocationArguments, false), + new String(inferredTypeArgument.readableName()), + new String(typeParameter.sourceName), @@ -3238,1 +3245,1 @@ - new String[] { --- + new String[] { @@ -3240,5 +3247,5 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), - typesAsString(false, invocationArguments, true), - new String(inferredTypeArgument.shortReadableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), + typesAsString(false, invocationArguments, true), + new String(inferredTypeArgument.shortReadableName()), + new String(typeParameter.sourceName), @@ -3247,1 +3254,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -3255,1 +3262,1 @@ - new String[] { --- + new String[] { @@ -3257,2 +3264,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -3260,1 +3267,1 @@ - new String[] { --- + new String[] { @@ -3262,2 +3269,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -3266,1 +3273,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -3270,1 +3277,1 @@ - new String[] { --- + new String[] { @@ -3272,2 +3279,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -3276,1 +3283,1 @@ - new String[] { --- + new String[] { @@ -3278,2 +3285,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -3283,1 +3290,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -3291,1 +3298,1 @@ - new String[] { --- + new String[] { @@ -3293,2 +3300,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -3297,1 +3304,1 @@ - new String[] { --- + new String[] { @@ -3299,2 +3306,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -3304,1 +3311,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -3311,1 +3318,1 @@ - new String[] { --- + new String[] { @@ -3313,2 +3320,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -3316,1 +3323,1 @@ - new String[] { --- + new String[] { @@ -3318,2 +3325,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -3322,1 +3329,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -3424,1 +3431,1 @@ - --- + @@ -3445,1 +3452,1 @@ - case ProblemReasons.IllegalSuperTypeVariable : --- + case ProblemReasons.IllegalSuperTypeVariable : @@ -3453,1 +3460,1 @@ - --- + @@ -3495,1 +3502,1 @@ - new String[] {new String(type.leafComponentType().readableName()) }, --- + new String[] {new String(type.leafComponentType().readableName()) }, @@ -3543,1 +3550,1 @@ - NoArgument, --- + NoArgument, @@ -3546,1 +3553,1 @@ - annotation.sourceEnd); --- + annotation.sourceEnd); @@ -3551,2 +3558,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3559,2 +3566,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3567,2 +3574,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3575,2 +3582,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3583,2 +3590,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3591,2 +3598,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3601,2 +3608,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3611,2 +3618,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3619,2 +3626,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3627,2 +3634,2 @@ - NoArgument, - NoArgument, --- + NoArgument, + NoArgument, @@ -3649,1 +3656,1 @@ - arguments, --- + arguments, @@ -3710,1 +3717,1 @@ - default: --- + default: @@ -3723,1 +3730,1 @@ - default: --- + default: @@ -3732,1 +3739,1 @@ - --- + @@ -3736,1 +3743,1 @@ - --- + @@ -3924,1 +3931,1 @@ - --- + @@ -3930,1 +3937,1 @@ - --- + @@ -3933,1 +3940,1 @@ - new String[] { --- + new String[] { @@ -3935,5 +3942,5 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), - typesAsString(false, invocationArguments, false), - new String(inferredTypeArgument.readableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), + typesAsString(false, invocationArguments, false), + new String(inferredTypeArgument.readableName()), + new String(typeParameter.sourceName), @@ -3941,1 +3948,1 @@ - new String[] { --- + new String[] { @@ -3943,5 +3950,5 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), - typesAsString(false, invocationArguments, true), - new String(inferredTypeArgument.shortReadableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), + typesAsString(false, invocationArguments, true), + new String(inferredTypeArgument.shortReadableName()), + new String(typeParameter.sourceName), @@ -3951,3 +3958,3 @@ - sourceEnd); - return; - --- + sourceEnd); + return; + @@ -3963,1 +3970,1 @@ - new String[] { --- + new String[] { @@ -3965,2 +3972,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -3968,1 +3975,1 @@ - new String[] { --- + new String[] { @@ -3970,2 +3977,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -3975,1 +3982,1 @@ - sourceEnd); --- + sourceEnd); @@ -3979,1 +3986,1 @@ - new String[] { --- + new String[] { @@ -3981,2 +3988,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -3985,1 +3992,1 @@ - new String[] { --- + new String[] { @@ -3987,2 +3994,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -3993,1 +4000,1 @@ - sourceEnd); --- + sourceEnd); @@ -4003,1 +4010,1 @@ - new String[] { --- + new String[] { @@ -4005,2 +4012,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -4009,1 +4016,1 @@ - new String[] { --- + new String[] { @@ -4011,2 +4018,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -4017,1 +4024,1 @@ - sourceEnd); --- + sourceEnd); @@ -4026,1 +4033,1 @@ - new String[] { --- + new String[] { @@ -4028,2 +4035,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), - new String(shownConstructor.declaringClass.readableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, false), + new String(shownConstructor.declaringClass.readableName()), @@ -4031,1 +4038,1 @@ - new String[] { --- + new String[] { @@ -4033,2 +4040,2 @@ - typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), - new String(shownConstructor.declaringClass.shortReadableName()), --- + typesAsString(shownConstructor.isVarargs(), shownConstructor.parameters, true), + new String(shownConstructor.declaringClass.shortReadableName()), @@ -4038,1 +4045,1 @@ - sourceEnd); --- + sourceEnd); @@ -4132,1 +4139,1 @@ - parameterTypeNames --- + parameterTypeNames @@ -4166,1 +4173,1 @@ - new String[] { --- + new String[] { @@ -4168,5 +4175,5 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), - typesAsString(false, invocationArguments, false), - new String(inferredTypeArgument.readableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), + typesAsString(false, invocationArguments, false), + new String(inferredTypeArgument.readableName()), + new String(typeParameter.sourceName), @@ -4174,1 +4181,1 @@ - new String[] { --- + new String[] { @@ -4176,5 +4183,5 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), - typesAsString(false, invocationArguments, true), - new String(inferredTypeArgument.shortReadableName()), - new String(typeParameter.sourceName), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), + typesAsString(false, invocationArguments, true), + new String(inferredTypeArgument.shortReadableName()), + new String(typeParameter.sourceName), @@ -4184,1 +4191,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -4195,1 +4202,1 @@ - new String[] { --- + new String[] { @@ -4197,2 +4204,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -4200,1 +4207,1 @@ - new String[] { --- + new String[] { @@ -4202,2 +4209,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -4207,1 +4214,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -4211,1 +4218,1 @@ - new String[] { --- + new String[] { @@ -4213,2 +4220,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -4217,1 +4224,1 @@ - new String[] { --- + new String[] { @@ -4219,2 +4226,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -4225,1 +4232,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -4235,1 +4242,1 @@ - new String[] { --- + new String[] { @@ -4237,2 +4244,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -4241,1 +4248,1 @@ - new String[] { --- + new String[] { @@ -4243,2 +4250,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -4249,1 +4256,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -4258,1 +4265,1 @@ - new String[] { --- + new String[] { @@ -4260,2 +4267,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), - new String(shownMethod.declaringClass.readableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, false), + new String(shownMethod.declaringClass.readableName()), @@ -4263,1 +4270,1 @@ - new String[] { --- + new String[] { @@ -4265,2 +4272,2 @@ - typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), - new String(shownMethod.declaringClass.shortReadableName()), --- + typesAsString(shownMethod.isVarargs(), shownMethod.parameters, true), + new String(shownMethod.declaringClass.shortReadableName()), @@ -4270,1 +4277,1 @@ - (int) messageSend.nameSourcePosition); --- + (int) messageSend.nameSourcePosition); @@ -4301,1 +4308,1 @@ -/** --- +/** @@ -4311,1 +4318,1 @@ -/** --- +/** @@ -4556,2 +4563,2 @@ - int id = (local instanceof Argument) - ? IProblem.ArgumentHidingLocalVariable --- + int id = (local instanceof Argument) + ? IProblem.ArgumentHidingLocalVariable @@ -4600,0 +4607,60 @@ +public void localCannotBeAssignedWithPotentiallyNull(LocalVariableBinding local, ASTNode location) { + int severity = computeSeverity(IProblem.LocalCannotBeAssignedPotentiallyNull); + if (severity == ProblemSeverities.Ignore) return; + String[] arguments = new String[] { new String(local.name) }; + this.handle( + IProblem.LocalCannotBeAssignedPotentiallyNull, + arguments, + arguments, + severity, + nodeSourceStart(local, location), + nodeSourceEnd(local, location)); +} +public void cannotReturnPotentiallyNullExpression(ASTNode location) { + int severity = computeSeverity(IProblem.CannotReturnPotentiallyNullExpression); + if (severity == ProblemSeverities.Ignore) return; + String[] arguments = new String[] { }; + this.handle( + IProblem.CannotReturnPotentiallyNullExpression, + arguments, + arguments, + severity, + location.sourceStart, + location.sourceEnd); +} +public void nonNullAnnotationIsMissingForOverridingMethod(ReferenceBinding type, MethodBinding method, ASTNode location) { + int severity = computeSeverity(IProblem.NonNullAnnotationIsMissingForOverridingMethod); + if (severity == ProblemSeverities.Ignore) return; + String[] arguments = new String[] { new String(type.readableName()), new String(method.readableName()) }; + this.handle( + IProblem.NonNullAnnotationIsMissingForOverridingMethod, + arguments, + arguments, + severity, + location.sourceStart, + location.sourceEnd); +} +public void nonNullAnnotationIsMissingForArgumentInOverridingMethod(ReferenceBinding type, MethodBinding method, Argument arg) { + int severity = computeSeverity(IProblem.NonNullAnnotationIsMissingForArgumentInOverridingMethod); + if (severity == ProblemSeverities.Ignore) return; + String[] arguments = new String[] { new String(type.readableName()), new String(method.readableName()), new String(arg.name) }; + this.handle( + IProblem.NonNullAnnotationIsMissingForArgumentInOverridingMethod, + arguments, + arguments, + severity, + arg.sourceStart, + arg.sourceEnd); +} +public void cannotPassPotentiallyNullExpressionAsArgument(MethodBinding method, ASTNode location) { + int severity = computeSeverity(IProblem.CannotPassPotentiallyNullExpressionAsArgument); + if (severity == ProblemSeverities.Ignore) return; + String[] arguments = new String[] { new String(method.readableName()) }; + this.handle( + IProblem.CannotPassPotentiallyNullExpressionAsArgument, + arguments, + arguments, + severity, + nodeSourceStart(method, location), + nodeSourceEnd(method, location)); +} @@ -4702,1 +4769,1 @@ - }, --- + }, @@ -4709,1 +4776,1 @@ - }, --- + }, @@ -4728,1 +4795,1 @@ -} --- +} @@ -4844,1 +4911,1 @@ - compUnitDecl.sourceStart + 1); --- + compUnitDecl.sourceStart + 1); @@ -4864,1 +4931,1 @@ - this.abortDueToInternalError(Messages.abort_missingCode, location); --- + this.abortDueToInternalError(Messages.abort_missingCode, location); @@ -4868,1 +4935,1 @@ - int id = isReadAccess --- + int id = isReadAccess @@ -4882,1 +4949,1 @@ - MethodBinding method, --- + MethodBinding method, @@ -4891,1 +4958,1 @@ - IProblem.NeedToEmulateConstructorAccess, --- + IProblem.NeedToEmulateConstructorAccess, @@ -4893,1 +4960,1 @@ - new String(method.declaringClass.readableName()), --- + new String(method.declaringClass.readableName()), @@ -4895,1 +4962,1 @@ - }, --- + }, @@ -4897,1 +4964,1 @@ - new String(method.declaringClass.shortReadableName()), --- + new String(method.declaringClass.shortReadableName()), @@ -4899,1 +4966,1 @@ - }, --- + }, @@ -4901,2 +4968,2 @@ - location.sourceStart, - location.sourceEnd); --- + location.sourceStart, + location.sourceEnd); @@ -4908,1 +4975,1 @@ - IProblem.NeedToEmulateMethodAccess, --- + IProblem.NeedToEmulateMethodAccess, @@ -4910,2 +4977,2 @@ - new String(method.declaringClass.readableName()), - new String(method.selector), --- + new String(method.declaringClass.readableName()), + new String(method.selector), @@ -4913,1 +4980,1 @@ - }, --- + }, @@ -4915,2 +4982,2 @@ - new String(method.declaringClass.shortReadableName()), - new String(method.selector), --- + new String(method.declaringClass.shortReadableName()), + new String(method.selector), @@ -4918,1 +4985,1 @@ - }, --- + }, @@ -4920,2 +4987,2 @@ - location.sourceStart, - location.sourceEnd); --- + location.sourceStart, + location.sourceEnd); @@ -5126,1 +5193,1 @@ - } else if (location instanceof AllocationExpression --- + } else if (location instanceof AllocationExpression @@ -5128,1 +5195,1 @@ - || (((AllocationExpression) location).binding.declaringClass.isAnonymousType() --- + || (((AllocationExpression) location).binding.declaringClass.isAnonymousType() @@ -5139,1 +5206,1 @@ - new String[] { new String(targetType.readableName())}, --- + new String[] { new String(targetType.readableName())}, @@ -5358,2 +5425,2 @@ - int startPosition, - int endPosition, --- + int startPosition, + int endPosition, @@ -5361,2 +5428,2 @@ - char[] currentTokenSource, - String errorTokenName, --- + char[] currentTokenSource, + String errorTokenName, @@ -5364,1 +5431,1 @@ - --- + @@ -5410,1 +5477,1 @@ - //extract the literal when it's a literal --- + //extract the literal when it's a literal @@ -5433,2 +5500,2 @@ - start, - end, --- + start, + end, @@ -5436,1 +5503,1 @@ - errorTokenSource, --- + errorTokenSource, @@ -5438,1 +5505,1 @@ - null); --- + null); @@ -5460,2 +5527,2 @@ - start, - end, --- + start, + end, @@ -5463,3 +5530,3 @@ - errorTokenSource, - errorTokenName, - expectedToken); --- + errorTokenSource, + errorTokenName, + expectedToken); @@ -5476,2 +5543,2 @@ - start, - end, --- + start, + end, @@ -5479,3 +5546,3 @@ - errorTokenSource, - errorTokenName, - expectedToken); --- + errorTokenSource, + errorTokenName, + expectedToken); @@ -5530,2 +5597,2 @@ - start, - end, --- + start, + end, @@ -5533,3 +5600,3 @@ - errorTokenSource, - errorTokenName, - expectedToken); --- + errorTokenSource, + errorTokenName, + expectedToken); @@ -5567,2 +5634,2 @@ - start, - end, --- + start, + end, @@ -5570,1 +5637,1 @@ - errorTokenSource, --- + errorTokenSource, @@ -5572,1 +5639,1 @@ - null); --- + null); @@ -5593,2 +5660,2 @@ - start, - end, --- + start, + end, @@ -5596,3 +5663,3 @@ - errorTokenSource, - errorTokenName, - expectedToken); --- + errorTokenSource, + errorTokenName, + expectedToken); @@ -5615,1 +5682,1 @@ - --- + @@ -5618,1 +5685,1 @@ - arguments = new String[] {Messages.parser_endOfConstructor}; --- + arguments = new String[] {Messages.parser_endOfConstructor}; @@ -5620,1 +5687,1 @@ - arguments = new String[] {Messages.parser_endOfMethod}; --- + arguments = new String[] {Messages.parser_endOfMethod}; @@ -5622,1 +5689,1 @@ - arguments = new String[] {Messages.parser_endOfInitializer}; --- + arguments = new String[] {Messages.parser_endOfInitializer}; @@ -5624,1 +5691,1 @@ - arguments = new String[] {Messages.parser_endOfFile}; --- + arguments = new String[] {Messages.parser_endOfFile}; @@ -5692,1 +5759,1 @@ - new String(constructorCall.binding.declaringClass.readableName()), --- + new String(constructorCall.binding.declaringClass.readableName()), @@ -5696,1 +5763,1 @@ - new String(constructorCall.binding.declaringClass.shortReadableName()), --- + new String(constructorCall.binding.declaringClass.shortReadableName()), @@ -5908,1 +5975,1 @@ - String[] arguments = flag == IProblem.ParsingErrorNoSuggestion --- + String[] arguments = flag == IProblem.ParsingErrorNoSuggestion @@ -5912,1 +5979,1 @@ - flag, --- + flag, @@ -5916,1 +5983,1 @@ - startPos, --- + startPos, @@ -5964,1 +6031,1 @@ - nodeSourceEnd(field, location)); --- + nodeSourceEnd(field, location)); @@ -6026,1 +6093,1 @@ - sourceEnd); --- + sourceEnd); @@ -6058,2 +6125,2 @@ - int startPosition, - int endPosition, --- + int startPosition, + int endPosition, @@ -6061,2 +6128,2 @@ - char[] currentTokenSource, - String errorTokenName, --- + char[] currentTokenSource, + String errorTokenName, @@ -6091,1 +6158,1 @@ - new String[] { tag, message, priority/*secret argument that is not surfaced in getMessage()*/}, --- + new String[] { tag, message, priority/*secret argument that is not surfaced in getMessage()*/}, @@ -6176,2 +6243,2 @@ - new String[] { - new String(typeDecl.name), --- + new String[] { + new String(typeDecl.name), @@ -6181,1 +6248,1 @@ - new String(declaringMethod.declaringClass.readableName()), --- + new String(declaringMethod.declaringClass.readableName()), @@ -6183,1 +6250,1 @@ - new String[] { --- + new String[] { @@ -6188,1 +6255,1 @@ - new String(declaringMethod.declaringClass.shortReadableName()), --- + new String(declaringMethod.declaringClass.shortReadableName()), @@ -6200,1 +6267,1 @@ - new String[] { new String(typeDecl.name) , new String(hiddenType.shortReadableName()) }, --- + new String[] { new String(typeDecl.name) , new String(hiddenType.shortReadableName()) }, @@ -6281,1 +6348,1 @@ - new String[] {new String(variableName), new String(binaryType.readableName()) }, --- + new String[] {new String(variableName), new String(binaryType.readableName()) }, @@ -6315,1 +6382,1 @@ - boolean insideDefaultConstructor = --- + boolean insideDefaultConstructor = @@ -6325,1 +6392,1 @@ - : (insideImplicitConstructorCall --- + : (insideImplicitConstructorCall @@ -6371,1 +6438,1 @@ - IProblem.UnmatchedBracket, --- + IProblem.UnmatchedBracket, @@ -6374,1 +6441,1 @@ - position, --- + position, @@ -6435,1 +6502,1 @@ - new String[] { --- + new String[] { @@ -6437,2 +6504,2 @@ - typesAsString(method.isVarargs(), method.parameters, false), - new String(method.declaringClass.readableName()), --- + typesAsString(method.isVarargs(), method.parameters, false), + new String(method.declaringClass.readableName()), @@ -6440,1 +6507,1 @@ - new String[] { --- + new String[] { @@ -6442,2 +6509,2 @@ - typesAsString(method.isVarargs(), method.parameters, true), - new String(method.declaringClass.shortReadableName()), --- + typesAsString(method.isVarargs(), method.parameters, true), + new String(method.declaringClass.shortReadableName()), @@ -6446,1 +6513,1 @@ - typeArguments[typeArguments.length-1].sourceEnd); --- + typeArguments[typeArguments.length-1].sourceEnd); @@ -6476,1 +6543,1 @@ - }, --- + }, @@ -6479,1 +6546,1 @@ - }, --- + }, @@ -6534,2 +6601,2 @@ - new String[]{ - new String(castedExpressionType.readableName()), --- + new String[]{ + new String(castedExpressionType.readableName()), @@ -6538,2 +6605,2 @@ - new String[]{ - new String(castedExpressionType.shortReadableName()), --- + new String[]{ + new String(castedExpressionType.shortReadableName()), @@ -6562,1 +6629,1 @@ - new String[] { --- + new String[] { @@ -6564,1 +6631,1 @@ - new String[] { --- + new String[] { @@ -6568,1 +6635,1 @@ - nodeSourceEnd(field, location)); --- + nodeSourceEnd(field, location)); @@ -6582,1 +6649,1 @@ - }, --- + }, @@ -6591,1 +6658,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -6600,1 +6667,1 @@ - }, --- + }, @@ -6609,1 +6676,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -6623,1 +6690,1 @@ - }, --- + }, @@ -6628,1 +6695,1 @@ - }, --- + }, @@ -6631,1 +6698,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -6640,1 +6707,1 @@ - }, --- + }, @@ -6649,1 +6716,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -6672,1 +6739,1 @@ - }, --- + }, @@ -6681,1 +6748,1 @@ - }, --- + }, @@ -6695,1 +6762,1 @@ - expression.sourceEnd); --- + expression.sourceEnd); @@ -6720,1 +6787,1 @@ - }, --- + }, @@ -6725,1 +6792,1 @@ - }, --- + }, @@ -6737,1 +6804,1 @@ - }, --- + }, @@ -6743,1 +6810,1 @@ - }, --- + }, @@ -6759,1 +6826,1 @@ - importRef.sourceEnd); --- + importRef.sourceEnd); @@ -6786,1 +6853,1 @@ - --- + @@ -6789,1 +6856,1 @@ - --- + @@ -6796,1 +6863,1 @@ - }, --- + }, @@ -6800,1 +6867,1 @@ - }, --- + }, @@ -6806,1 +6873,1 @@ - --- + @@ -6811,1 +6878,1 @@ - --- + @@ -6830,1 +6897,1 @@ - }, --- + }, @@ -6834,1 +6901,1 @@ - }, --- + }, @@ -6843,1 +6910,1 @@ - --- + @@ -6845,1 +6912,1 @@ - --- + @@ -6884,1 +6951,1 @@ - }, --- + }, @@ -6889,1 +6956,1 @@ - }, --- + }, @@ -6903,1 +6970,1 @@ - }, --- + }, @@ -6906,1 +6973,1 @@ - }, --- + }, @@ -6917,1 +6984,1 @@ - sourceEnd); --- + sourceEnd); @@ -6925,1 +6992,1 @@ - sourceEnd); --- + sourceEnd); @@ -6935,5 +7002,5 @@ - new String(argumentType.readableName()), - new String(varargsType.readableName()), - new String(method.declaringClass.readableName()), - typesAsString(method.isVarargs(), method.parameters, false), - new String(varargsType.elementsType().readableName()), --- + new String(argumentType.readableName()), + new String(varargsType.readableName()), + new String(method.declaringClass.readableName()), + typesAsString(method.isVarargs(), method.parameters, false), + new String(varargsType.elementsType().readableName()), @@ -6942,5 +7009,5 @@ - new String(argumentType.shortReadableName()), - new String(varargsType.shortReadableName()), - new String(method.declaringClass.shortReadableName()), - typesAsString(method.isVarargs(), method.parameters, true), - new String(varargsType.elementsType().shortReadableName()), --- + new String(argumentType.shortReadableName()), + new String(varargsType.shortReadableName()), + new String(method.declaringClass.shortReadableName()), + typesAsString(method.isVarargs(), method.parameters, true), + new String(varargsType.elementsType().shortReadableName()), @@ -6954,7 +7021,7 @@ - new String[] { - new String(argumentType.readableName()), - new String(varargsType.readableName()), - new String(method.selector), - typesAsString(method.isVarargs(), method.parameters, false), - new String(method.declaringClass.readableName()), - new String(varargsType.elementsType().readableName()), --- + new String[] { + new String(argumentType.readableName()), + new String(varargsType.readableName()), + new String(method.selector), + typesAsString(method.isVarargs(), method.parameters, false), + new String(method.declaringClass.readableName()), + new String(varargsType.elementsType().readableName()), @@ -6962,6 +7029,6 @@ - new String[] { - new String(argumentType.shortReadableName()), - new String(varargsType.shortReadableName()), - new String(method.selector), typesAsString(method.isVarargs(), method.parameters, true), - new String(method.declaringClass.shortReadableName()), - new String(varargsType.elementsType().shortReadableName()), --- + new String[] { + new String(argumentType.shortReadableName()), + new String(varargsType.shortReadableName()), + new String(method.selector), typesAsString(method.isVarargs(), method.parameters, true), + new String(method.declaringClass.shortReadableName()), + new String(varargsType.elementsType().shortReadableName()), @@ -6977,1 +7044,1 @@ - new String[] { --- + new String[] { @@ -6984,1 +7051,1 @@ - new String[] { --- + new String[] { @@ -7025,1 +7092,1 @@ - new String[] { --- + new String[] { @@ -7027,1 +7094,1 @@ - new String[] { --- + new String[] { @@ -7030,1 +7097,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -7043,1 +7110,1 @@ - --- + @@ -7054,1 +7121,1 @@ - }, --- + }, @@ -7062,1 +7129,1 @@ - }, --- + }, @@ -7064,1 +7131,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -7075,1 +7142,1 @@ - }, --- + }, @@ -7083,1 +7150,1 @@ - }, --- + }, @@ -7085,1 +7152,1 @@ - location.sourceEnd); --- + location.sourceEnd); @@ -7098,1 +7165,1 @@ - }, --- + }, @@ -7102,1 +7169,1 @@ - }, --- + }, Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v --- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 1.229 +++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties @@ -69,1 +69,1 @@ -79 = Unqualified access to the field {0}.{1} --- +79 = Unqualified access to the field {0}.{1} @@ -101,1 +101,1 @@ -119 = The static method {1}({2}) from the type {0} should be accessed directly --- +119 = The static method {1}({2}) from the type {0} should be accessed directly @@ -126,1 +126,1 @@ -154 = The literal {1} of type {0} is out of range --- +154 = The literal {1} of type {0} is out of range @@ -167,1 +167,1 @@ -196 = The field {0} is defined in an inherited type and an enclosing scope --- +196 = The field {0} is defined in an inherited type and an enclosing scope @@ -330,1 +330,1 @@ - --- + @@ -350,1 +350,1 @@ -421 = Code snippet support cannot find the method {0}.{1}({2}) --- +421 = Code snippet support cannot find the method {0}.{1}({2}) @@ -424,1 +424,1 @@ -509 = The field {0} is defined in an inherited type and an enclosing scope --- +509 = The field {0} is defined in an inherited type and an enclosing scope @@ -429,1 +429,1 @@ -514 = Javadoc: --- +514 = Javadoc: @@ -540,1 +540,1 @@ -625 = The value for annotation attribute {0}.{1} must be some @{2} annotation --- +625 = The value for annotation attribute {0}.{1} must be some @{2} annotation @@ -600,0 +600,7 @@ +### @NonNull annotation +903 = Cannot assign null or potentially null expression to {0} because of @NonNull annotation +904 = Cannot pass null or potentially null expression as argument for method {0} because of @NonNull annotation +905 = Cannot return null or potentially null expression because of @NonNull annotation +906 = Method {1} isn't NonNull annotated while overridden method in {0} is +907 = Argument {2} in method {1} isn't NonNull annotated while overridden method in type {0} is +