### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java,v retrieving revision 1.44 diff -u -r1.44 AND_AND_Expression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java 22 Jul 2009 17:56:52 -0000 1.44 +++ compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java 15 Jul 2010 15:38:01 -0000 @@ -60,6 +60,12 @@ } } rightInfo = this.right.analyseCode(currentScope, flowContext, rightInfo); + if ((this.left.implicitConversion & TypeIds.UNBOXING) != 0) { + this.left.checkNPE(currentScope, flowContext, flowInfo); + } + if ((this.right.implicitConversion & TypeIds.UNBOXING) != 0) { + this.right.checkNPE(currentScope, flowContext, flowInfo); + } FlowInfo mergedInfo = FlowInfo.conditional( rightInfo.safeInitsWhenTrue(), leftInfo.initsWhenFalse().unconditionalInits().mergedWith( Index: compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java,v retrieving revision 1.83 diff -u -r1.83 AllocationExpression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 13 Jan 2010 15:13:49 -0000 1.83 +++ compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 15 Jul 2010 15:38:01 -0000 @@ -39,6 +39,9 @@ this.arguments[i] .analyseCode(currentScope, flowContext, flowInfo) .unconditionalInits(); + if ((this.arguments[i].implicitConversion & TypeIds.UNBOXING) != 0) { + this.arguments[i].checkNPE(currentScope, flowContext, flowInfo); + } } } // record some dependency information for exception types Index: compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java,v retrieving revision 1.43 diff -u -r1.43 ArrayAllocationExpression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java 27 Jun 2008 16:03:56 -0000 1.43 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java 15 Jul 2010 15:38:02 -0000 @@ -30,6 +30,9 @@ Expression dim; if ((dim = this.dimensions[i]) != null) { flowInfo = dim.analyseCode(currentScope, flowContext, flowInfo); + if ((dim.implicitConversion & TypeIds.UNBOXING) != 0) { + dim.checkNPE(currentScope, flowContext, flowInfo); + } } } if (this.initializer != null) { Index: compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java,v retrieving revision 1.62 diff -u -r1.62 AssertStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java 25 Feb 2010 15:27:01 -0000 1.62 +++ compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java 15 Jul 2010 15:38:02 -0000 @@ -42,6 +42,9 @@ this.preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo); Constant cst = this.assertExpression.optimizedBooleanConstant(); + if ((this.assertExpression.implicitConversion & TypeIds.UNBOXING) != 0) { + this.assertExpression.checkNPE(currentScope, flowContext, flowInfo); + } boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true; boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == 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 retrieving revision 1.89 diff -u -r1.89 Assignment.java --- compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java 14 Jul 2010 10:37:15 -0000 1.89 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java 15 Jul 2010 15:38:02 -0000 @@ -37,6 +37,9 @@ // a field reference, a blank final field reference, a field of an enclosing instance or // just a local variable. LocalVariableBinding local = this.lhs.localVariableBinding(); + if ((this.expression.implicitConversion & TypeIds.UNBOXING) != 0) { + this.expression.checkNPE(currentScope, flowContext, flowInfo); + } int nullStatus = this.expression.nullStatus(flowInfo); if (local != null && (local.type.tagBits & TagBits.IsBaseType) == 0) { if (nullStatus == FlowInfo.NULL) { Index: compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java,v retrieving revision 1.134 diff -u -r1.134 CastExpression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java 7 Jan 2010 20:18:49 -0000 1.134 +++ compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java 15 Jul 2010 15:38:03 -0000 @@ -47,9 +47,13 @@ } public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { - return this.expression + FlowInfo result = this.expression .analyseCode(currentScope, flowContext, flowInfo) .unconditionalInits(); + if ((this.expression.implicitConversion & TypeIds.UNBOXING) != 0) { + this.expression.checkNPE(currentScope, flowContext, flowInfo); + } + return result; } /** Index: compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java,v retrieving revision 1.60 diff -u -r1.60 DoStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java 19 Jun 2009 16:11:34 -0000 1.60 +++ compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java 15 Jul 2010 15:38:04 -0000 @@ -52,6 +52,9 @@ Constant cst = this.condition.constant; boolean isConditionTrue = cst != Constant.NotAConstant && cst.booleanValue() == true; cst = this.condition.optimizedBooleanConstant(); + if ((this.condition.implicitConversion & TypeIds.UNBOXING) != 0) { + this.condition.checkNPE(currentScope, flowContext, flowInfo); + } boolean isConditionOptimizedTrue = cst != Constant.NotAConstant && cst.booleanValue() == true; boolean isConditionOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false; Index: compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java,v retrieving revision 1.73 diff -u -r1.73 ExplicitConstructorCall.java --- compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 25 Nov 2009 04:56:02 -0000 1.73 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 15 Jul 2010 15:38:04 -0000 @@ -76,6 +76,9 @@ this.arguments[i] .analyseCode(currentScope, flowContext, flowInfo) .unconditionalInits(); + if ((this.arguments[i].implicitConversion & TypeIds.UNBOXING) != 0) { + this.arguments[i].checkNPE(currentScope, flowContext, flowInfo); + } } } Index: compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java,v retrieving revision 1.67 diff -u -r1.67 ForStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java 7 Mar 2009 01:08:07 -0000 1.67 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java 15 Jul 2010 15:38:05 -0000 @@ -92,6 +92,9 @@ new LoopingFlowContext(flowContext, flowInfo, this, null, null, this.scope)), condInfo); + if ((this.condition.implicitConversion & TypeIds.UNBOXING) != 0) { + this.condition.checkNPE(currentScope, flowContext, flowInfo); + } } } Index: compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java,v retrieving revision 1.67 diff -u -r1.67 IfStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 11 Feb 2010 01:32:26 -0000 1.67 +++ compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 15 Jul 2010 15:38:06 -0000 @@ -57,6 +57,9 @@ int initialComplaintLevel = (flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0 ? Statement.COMPLAINED_FAKE_REACHABLE : Statement.NOT_COMPLAINED; Constant cst = this.condition.optimizedBooleanConstant(); + if ((this.condition.implicitConversion & TypeIds.UNBOXING) != 0) { + this.condition.checkNPE(currentScope, flowContext, flowInfo); + } boolean isConditionOptimizedTrue = cst != Constant.NotAConstant && cst.booleanValue() == true; boolean isConditionOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false; 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 retrieving revision 1.71 diff -u -r1.71 LocalDeclaration.java --- compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java 23 Oct 2009 15:15:26 -0000 1.71 +++ compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java 15 Jul 2010 15:38:06 -0000 @@ -40,6 +40,9 @@ if (this.initialization == null) { return flowInfo; } + if ((this.initialization.implicitConversion & TypeIds.UNBOXING) != 0) { + this.initialization.checkNPE(currentScope, flowContext, flowInfo); + } int nullStatus = this.initialization.nullStatus(flowInfo); flowInfo = this.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 retrieving revision 1.146 diff -u -r1.146 MessageSend.java --- compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 18 Jan 2010 12:40:18 -0000 1.146 +++ compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 15 Jul 2010 15:38:07 -0000 @@ -65,6 +65,9 @@ if (this.arguments != null) { int length = this.arguments.length; for (int i = 0; i < length; i++) { + if ((this.arguments[i].implicitConversion & TypeIds.UNBOXING) != 0) { + this.arguments[i].checkNPE(currentScope, flowContext, flowInfo); + } flowInfo = this.arguments[i].analyseCode(currentScope, flowContext, flowInfo).unconditionalInits(); } } Index: compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java,v retrieving revision 1.44 diff -u -r1.44 OR_OR_Expression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java 21 Jan 2010 17:06:49 -0000 1.44 +++ compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java 15 Jul 2010 15:38:08 -0000 @@ -62,6 +62,12 @@ } } rightInfo = this.right.analyseCode(currentScope, flowContext, rightInfo); + if ((this.left.implicitConversion & TypeIds.UNBOXING) != 0) { + this.left.checkNPE(currentScope, flowContext, flowInfo); + } + if ((this.right.implicitConversion & TypeIds.UNBOXING) != 0) { + this.right.checkNPE(currentScope, flowContext, flowInfo); + } // The definitely null variables in right info when true should not be missed out while merging // https://bugs.eclipse.org/bugs/show_bug.cgi?id=299900 FlowInfo leftInfoWhenTrueForMerging = leftInfo.initsWhenTrue().unconditionalCopy().addPotentialInitializationsFrom(rightInfo.unconditionalInitsWithoutSideEffect()); Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java,v retrieving revision 1.100 diff -u -r1.100 QualifiedAllocationExpression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 23 Jun 2010 06:52:46 -0000 1.100 +++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 15 Jul 2010 15:38:09 -0000 @@ -71,6 +71,9 @@ if (this.arguments != null) { for (int i = 0, count = this.arguments.length; i < count; i++) { flowInfo = this.arguments[i].analyseCode(currentScope, flowContext, flowInfo); + if ((this.arguments[i].implicitConversion & TypeIds.UNBOXING) != 0) { + this.arguments[i].checkNPE(currentScope, flowContext, flowInfo); + } } } 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 retrieving revision 1.67 diff -u -r1.67 ReturnStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java 7 Mar 2009 00:58:57 -0000 1.67 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java 15 Jul 2010 15:38:09 -0000 @@ -36,6 +36,9 @@ if (this.expression != null) { flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo); + if ((this.expression.implicitConversion & TypeIds.UNBOXING) != 0) { + this.expression.checkNPE(currentScope, flowContext, flowInfo); + } } this.initStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo); Index: compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java,v retrieving revision 1.78 diff -u -r1.78 SwitchStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java 18 Jun 2010 16:28:33 -0000 1.78 +++ compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java 15 Jul 2010 15:38:10 -0000 @@ -47,6 +47,9 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { try { flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo); + if ((this.expression.implicitConversion & TypeIds.UNBOXING) != 0) { + this.expression.checkNPE(currentScope, flowContext, flowInfo); + } SwitchFlowContext switchContext = new SwitchFlowContext(flowContext, this, (this.breakLabel = new BranchLabel())); Index: compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java,v retrieving revision 1.64 diff -u -r1.64 WhileStatement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java 7 Mar 2009 01:08:07 -0000 1.64 +++ compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java 15 Jul 2010 15:38:10 -0000 @@ -63,6 +63,9 @@ new LoopingFlowContext(flowContext, flowInfo, this, null, null, currentScope)), condInfo); + if ((this.condition.implicitConversion & TypeIds.UNBOXING) != 0) { + this.condition.checkNPE(currentScope, flowContext, flowInfo); + } LoopingFlowContext loopingContext; FlowInfo actionInfo; #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java,v retrieving revision 1.95 diff -u -r1.95 NullReferenceTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java 16 Mar 2010 14:36:08 -0000 1.95 +++ src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java 15 Jul 2010 15:38:27 -0000 @@ -11662,4 +11662,195 @@ "----------\n", JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=319201 +// unboxing raises an NPE +public void testBug319201() { + if (this.complianceLevel < ClassFileConstants.JDK1_5) + return; + runNegativeTest( + new String[] { + "X.java", + "public class X {\n" + + " public void foo() {\n" + + " Integer i = null;\n" + + " int j = i;\n" + // should warn + " }\n" + + "}"}, + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " int j = i;\n" + + " ^\n" + + "Null pointer access: The variable i can only be null at this location\n" + + "----------\n", + JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); +} +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=319201 +//unboxing could raise an NPE +public void testBug319201a() { + if (this.complianceLevel < ClassFileConstants.JDK1_5) + return; + runNegativeTest( + new String[] { + "X.java", + "public class X {\n" + + " public void foo(Integer i) {\n" + + " if (i == null) {};\n" + + " int j;\n" + + " j = i;\n" + // should warn + " }\n" + + "}"}, + "----------\n" + + "1. ERROR in X.java (at line 5)\n" + + " j = i;\n" + + " ^\n" + + "Potential null pointer access: The variable i may be null at this location\n" + + "----------\n", + JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); +} +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=319201 +//unboxing raises an NPE +public void testBug319201b() { + if (this.complianceLevel < ClassFileConstants.JDK1_5) + return; + runNegativeTest( + new String[] { + "X.java", + "public class X {\n" + + " public void foo() {\n" + + " Boolean bo = null;;\n" + + " bar(bo);\n" + // should warn + " }\n" + + " void bar(boolean b) {}\n" + + "}"}, + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " bar(bo);\n" + + " ^^\n" + + "Null pointer access: The variable bo can only be null at this location\n" + + "----------\n", + JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); +} +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=319201 +//unboxing raises an NPE +public void testBug319201c() { + if (this.complianceLevel < ClassFileConstants.JDK1_5) + return; + runNegativeTest( + new String[] { + "X.java", + "class Y { public Y(boolean b1, boolean b2) {} }\n" + + "public class X extends Y {\n" + + " public X(boolean b, Boolean b2) {\n" + + " super(b2 == null, b2);\n" + + " }\n" + + " class Z {\n" + + " public Z(boolean b) {}\n" + + " }\n" + + " boolean fB = (Boolean)null;\n" + + " public boolean foo(boolean inB) {\n" + + " Boolean b1 = null;\n" + + " X x = new X(b1, null);\n" + + " Boolean b2 = null;\n" + + " boolean dontcare = b2 && inB;\n" + + " Boolean b3 = null;\n" + + " dontcare = inB || b3;\n" + + " Integer dims = null;\n" + + " char[] cs = new char[dims];\n" + + " Boolean b5 = null;\n" + + " do {\n" + + " Boolean b4 = null;\n" + + " for (int i=0;b4; i++);\n" + + " } while (b5);\n" + + " Boolean b6 = null;\n" + + " if (b6) { }\n" + + " Boolean b7 = null;\n" + + " Z z = this.new Z(b7);\n" + + " Integer sel = null;\n" + + " switch(sel) {\n" + + " case 1: break;\n" + + " default: break;\n" + + " }\n" + + " Boolean b8 = null;\n" + + " while (b8) {}\n" + + " Boolean b9 = null;\n" + + " dontcare = (boolean)b9;\n" + + " Boolean b10 = null;\n" + + " assert b10 : \"shouldn't happen, but will\";\n" + + " Boolean b11 = null;\n" + + " return b11;\n" + + " }\n" + + "}"}, + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " super(b2 == null, b2);\n" + + " ^^\n" + + "Potential null pointer access: The variable b2 may be null at this location\n" + + "----------\n" + + "2. ERROR in X.java (at line 12)\n" + + " X x = new X(b1, null);\n" + + " ^^\n" + + "Null pointer access: The variable b1 can only be null at this location\n" + + "----------\n" + + "3. ERROR in X.java (at line 14)\n" + + " boolean dontcare = b2 && inB;\n" + + " ^^\n" + + "Null pointer access: The variable b2 can only be null at this location\n" + + "----------\n" + + "4. ERROR in X.java (at line 16)\n" + + " dontcare = inB || b3;\n" + + " ^^\n" + + "Null pointer access: The variable b3 can only be null at this location\n" + + "----------\n" + + "5. ERROR in X.java (at line 18)\n" + + " char[] cs = new char[dims];\n" + + " ^^^^\n" + + "Null pointer access: The variable dims can only be null at this location\n" + + "----------\n" + + "6. ERROR in X.java (at line 22)\n" + + " for (int i=0;b4; i++);\n" + + " ^^\n" + + "Null pointer access: The variable b4 can only be null at this location\n" + + "----------\n" + + "7. ERROR in X.java (at line 23)\n" + + " } while (b5);\n" + + " ^^\n" + + "Null pointer access: The variable b5 can only be null at this location\n" + + "----------\n" + + "8. ERROR in X.java (at line 25)\n" + + " if (b6) { }\n" + + " ^^\n" + + "Null pointer access: The variable b6 can only be null at this location\n" + + "----------\n" + + "9. ERROR in X.java (at line 27)\n" + + " Z z = this.new Z(b7);\n" + + " ^^\n" + + "Null pointer access: The variable b7 can only be null at this location\n" + + "----------\n" + + "10. ERROR in X.java (at line 29)\n" + + " switch(sel) {\n" + + " ^^^\n" + + "Null pointer access: The variable sel can only be null at this location\n" + + "----------\n" + + "11. ERROR in X.java (at line 34)\n" + + " while (b8) {}\n" + + " ^^\n" + + "Null pointer access: The variable b8 can only be null at this location\n" + + "----------\n" + + "12. ERROR in X.java (at line 36)\n" + + " dontcare = (boolean)b9;\n" + + " ^^\n" + + "Null pointer access: The variable b9 can only be null at this location\n" + + "----------\n" + + "13. ERROR in X.java (at line 38)\n" + + " assert b10 : \"shouldn\'t happen, but will\";\n" + + " ^^^\n" + + "Null pointer access: The variable b10 can only be null at this location\n" + + "----------\n" + + "14. ERROR in X.java (at line 40)\n" + + " return b11;\n" + + " ^^^\n" + + "Null pointer access: The variable b11 can only be null at this location\n" + + "----------\n", + JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); +} } \ No newline at end of file