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 130380 Details for
Bug 270446
"Compute launch button tooltip" error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch + tests
patch.txt (text/plain), 2.67 KB, created by
Srikanth Sankaran
on 2009-03-31 08:00:07 EDT
(
hide
)
Description:
Proposed patch + tests
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2009-03-31 08:00:07 EDT
Size:
2.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java,v >retrieving revision 1.104 >diff -u -r1.104 ConstructorDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 7 Mar 2009 00:58:57 -0000 1.104 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 31 Mar 2009 11:54:54 -0000 >@@ -62,6 +62,10 @@ > } else if (!constructorBinding.isOrEnclosedByPrivateType()) { > break checkUnused; > } >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=270446, When the AST built is an abridged version >+ // we don't have all tree nodes we would otherwise expect. (see ASTParser.setFocalPosition) >+ if (this.constructorCall == null) >+ break checkUnused; > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=264991, Don't complain about this > // constructor being unused if the base class doesn't have a no-arg constructor. > // See that a seemingly unused constructor that chains to another constructor with a >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java,v >retrieving revision 1.193 >diff -u -r1.193 ASTConverterTest2.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 29 Nov 2008 22:35:14 -0000 1.193 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 31 Mar 2009 11:54:59 -0000 >@@ -5539,5 +5539,35 @@ > workingCopy.discardWorkingCopy(); > } > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=270446. NPE while building abridged AST >+ public void test0610() throws CoreException { >+ ICompilationUnit workingCopy = null; >+ try { >+ workingCopy = getWorkingCopy( >+ "/Converter/src/X.java", >+ "public class X {\n" + >+ " private class B {\n" + >+ " public B() {\n" + >+ " }\n" + >+ " }\n" + >+ " public X() {\n" + >+ " }\n" + >+ " }\n" >+ ); >+ >+ // Create parser >+ ASTParser parser = ASTParser.newParser(AST.JLS3); >+ parser.setSource(workingCopy); >+ parser.setFocalPosition(0); >+ parser.setResolveBindings(true); >+ >+ ASTNode result = parser.createAST(null); >+ assertNotNull("Should get an AST", result); >+ } finally { >+ if (workingCopy != null) >+ workingCopy.discardWorkingCopy(); >+ } >+ } > > }
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 270446
: 130380