Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 36803 Details for
Bug 128962
[compiler][null] incorrect analysis within try finally with a constructor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
HEAD - suggested fix plus test case
org.eclipse.jdt.core_wip_02.txt (text/plain), 5.70 KB, created by
Maxime Daniel
on 2006-03-23 07:12:16 EST
(
hide
)
Description:
HEAD - suggested fix plus test case
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2006-03-23 07:12:16 EST
Size:
5.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >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.74 >diff -u -r1.74 QualifiedAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 24 Jan 2006 10:50:38 -0000 1.74 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 23 Mar 2006 10:31:52 -0000 >@@ -75,7 +75,7 @@ > flowContext.checkExceptionHandlers( > thrownExceptions, > this, >- flowInfo, >+ flowInfo.unconditionalCopy(), > currentScope); > } > manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo); >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.61 >diff -u -r1.61 AllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 2 Mar 2006 11:57:46 -0000 1.61 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 23 Mar 2006 10:31:52 -0000 >@@ -48,7 +48,7 @@ > flowContext.checkExceptionHandlers( > thrownExceptions, > this, >- flowInfo, >+ flowInfo.unconditionalCopy(), > currentScope); > } > manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo); >#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.23 >diff -u -r1.23 NullReferenceTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java 22 Mar 2006 16:41:24 -0000 1.23 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java 23 Mar 2006 10:31:55 -0000 >@@ -34,8 +34,10 @@ > static { > // TESTS_NAMES = new String[] { "test011" }; > // TESTS_NUMBERS = new int[] { 516 }; >+// TESTS_NUMBERS = new int[] { 519 }; > // TESTS_NUMBERS = new int[] { 2999 }; > // TESTS_RANGE = new int[] { 2050, -1 }; >+ TESTS_RANGE = new int[] { 519, 522 }; > // TESTS_RANGE = new int[] { 1, 2049 }; > // TESTS_RANGE = new int[] { 449, 451 }; > // TESTS_RANGE = new int[] { 900, 999 }; >@@ -4053,13 +4055,106 @@ > > // null analysis -- try/finally > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=128962 >-// incorrect analysis within try finally with a constructor >-public void _test0519_try_finally() { >+// incorrect analysis within try finally with a constructor throwing an exception >+public void test0519_try_finally_constructor_exc() { > this.runConformTest( > new String[] { > "X.java", > "public class X {\n" + >- " public void foo(Y y) throws E {\n" + >+ " public void foo(Y y) throws E {\n" + >+ " try {\n" + >+ " new Y();\n" + >+ " y.bar();\n" + // should be quiet >+ " } finally {\n" + >+ " y = null;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" + >+ "class Y {\n" + >+ " Y() throws E {\n" + >+ " }\n" + >+ " void bar() throws E {\n" + >+ " }\n" + >+ "}\n" + >+ "class E extends Exception {\n" + >+ " private static final long serialVersionUID = 1L;\n" + >+ "}\n" + >+ "\n"}, >+ ""); >+} >+ >+// null analysis -- try/finally >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=128962 >+// incorrect analysis within try finally with a constructor throwing an exception >+// variant >+public void test0520_try_finally_constructor_exc() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " public void foo(Y y) throws E {\n" + >+ " try {\n" + >+ " new Y();\n" + >+ " y.bar();\n" + // should be quiet >+ " } finally {\n" + >+ " y = null;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" + >+ "class Y {\n" + >+ " Y() throws E {\n" + >+ " }\n" + >+ " void bar() throws E {\n" + >+ " }\n" + >+ "}\n" + >+ "class E extends Exception {\n" + >+ " private static final long serialVersionUID = 1L;\n" + >+ "}\n" + >+ "\n"}, >+ ""); >+} >+ >+// null analysis -- try/finally >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=128962 >+// incorrect analysis within try finally with a constructor throwing an exception >+// variant >+public void test0521_try_finally_constructor_exc() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " public void foo(Y y) throws E {\n" + >+ " try {\n" + >+ " new Y();\n" + >+ " y.bar();\n" + // should be quiet >+ " } finally {\n" + >+ " y = null;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n" + >+ "class Y {\n" + >+ " Y() throws E {\n" + >+ " }\n" + >+ " void bar() throws E {\n" + >+ " }\n" + >+ "}\n" + >+ "class E extends Exception {\n" + >+ " private static final long serialVersionUID = 1L;\n" + >+ "}\n" + >+ "\n"}, >+ ""); >+} >+ >+// null analysis -- try/finally >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=128962 >+// incorrect analysis within try finally with a constructor throwing an exception >+// variant >+public void test0522_try_finally_constructor_exc() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " public void foo(Y y) throws E {\n" + > " try {\n" + > " new Y();\n" + > " y.bar();\n" + // should be quiet
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 128962
: 36803