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 26300 Details for
Bug 100606
NPE during reconcile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch100606_org.eclipse.jdt.core.tests.model.txt (text/plain), 3.03 KB, created by
Jerome Lanneluc
on 2005-08-19 11:03:04 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-08-19 11:03:04 EDT
Size:
3.03 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.169 >diff -u -r1.169 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 12 Aug 2005 15:40:11 -0000 1.169 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 19 Aug 2005 14:59:17 -0000 >@@ -11,11 +11,16 @@ > > package org.eclipse.jdt.core.tests.dom; > >+import java.io.File; > import java.io.IOException; >+import java.util.HashMap; > import java.util.List; >+import java.util.Map; > > import junit.framework.Test; > >+import org.eclipse.core.resources.IFolder; >+import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.jdt.core.ICompilationUnit; > import org.eclipse.jdt.core.IJavaElement; >@@ -24,6 +29,7 @@ > import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jdt.core.JavaModelException; > import org.eclipse.jdt.core.dom.*; >+import org.eclipse.jdt.core.tests.util.Util; > > public class ASTConverter15Test extends ConverterTestSetup { > >@@ -39,7 +45,7 @@ > } > > static { >-// TESTS_NUMBERS = new int[] { 195 }; >+// TESTS_NUMBERS = new int[] { 196 }; > // TESTS_NAMES = new String[] {"test0189"}; > } > public static Test suite() { >@@ -5879,4 +5885,45 @@ > assertTrue("Bindings are not equals", methodBinding2.isEqualTo(methodBinding2)); > assertTrue("Bindings are not equals", methodBinding.isEqualTo(methodBinding)); > } >+ >+ /* >+ * Ensures that creating an AST with binding resolution where there is a problem in a binary >+ * doesn't throw an NPE >+ * (regression test for bug 100606 NPE during reconcile) >+ */ >+ public void test0196() throws CoreException { >+ try { >+ createJavaProject("P", new String[] {"src" }, new String[] {"CONVERTER_JCL15_LIB", "/P/lib"}, "bin", "1.5"); >+ IFolder folder = createFolder("/P/lib"); >+ String classesPath = folder.getLocation().toOSString(); >+ Map options = new HashMap(); >+ String[] pathsAndContents = new String[] { >+ "p/Bin.java", >+ "package p;\n" + >+ "public class Bin {\n" + >+ "}", >+ "p/BinSub.java", >+ "package p;\n" + >+ "public class BinSub extends Bin {\n" + >+ "}", >+ }; >+ Util.compile(pathsAndContents, options, classesPath); >+ folder.refreshLocal(IResource.DEPTH_INFINITE, null); >+ folder.getFolder("p").getFile("Bin.class").delete(false, null); >+ this.workingCopy = getWorkingCopy("/P/src/X.java", true/*resolve*/); >+ String contents = >+ "public class X {\n" + >+ " void bar() throws p.BinSub {\n" + >+ " }\n" + >+ " </*start*/T/*end*/> void foo() {\n" + >+ " }\n" + >+ "}"; >+ IBinding[] bindings = resolveBindings(contents, this.workingCopy); >+ assertBindingsEqual( >+ "LX;.foo<T:>():TT;", >+ bindings); >+ } finally { >+ deleteProject("P"); >+ } >+ } > } >\ No newline at end of file
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 100606
:
26299
| 26300