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 38278 Details for
Bug 135296
opening a special java file results in an "out of memory" message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch and regression test
135296.txt (text/plain), 4.67 KB, created by
Jerome Lanneluc
on 2006-04-11 07:37:05 EDT
(
hide
)
Description:
Proposed patch and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2006-04-11 07:37:05 EDT
Size:
4.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java,v >retrieving revision 1.96 >diff -u -r1.96 ReconcilerTests.java >--- src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 29 Mar 2006 04:03:08 -0000 1.96 >+++ src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 11 Apr 2006 11:22:42 -0000 >@@ -927,6 +927,42 @@ > deleteFile("/Reconciler/src/p1/OS.java"); > } > } >+/* >+ * Ensures that the source type converter doesn't throw an OutOfMemoryError if converting a generic type with a primitive type array as argument >+ * (regression test for bug 135296 opening a special java file results in an "out of memory" message) >+ */ >+public void testConvertPrimitiveTypeArrayTypeArgument() throws CoreException { >+ ICompilationUnit otherCopy = null; >+ try { >+ WorkingCopyOwner owner = new WorkingCopyOwner() {}; >+ otherCopy = getWorkingCopy( >+ "Reconciler15/src/Y.java", >+ "public class Y {\n" + >+ " void foo(Z<int[]> z) {}\n" + >+ "}\n" + >+ "class Z<E> {\n" + >+ "}", >+ owner, >+ false/*don't compute problems*/); >+ setUp15WorkingCopy("/Reconciler15/src/X.java", owner); >+ setWorkingCopyContents( >+ "public class X {\n" + >+ " void bar(Y y) {\n" + >+ " y.foo(new Z<int[]>());\n" + >+ " }\n" + >+ "}" >+ ); >+ this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, owner, null); >+ assertProblems( >+ "Unexpected problems", >+ "----------\n" + >+ "----------\n" >+ ); >+ } finally { >+ if (otherCopy != null) >+ otherCopy.discardWorkingCopy(); >+ } >+} > /** > * Ensures that the reconciler reconciles the new contents with the current > * contents, updating the structure of this reconciler's compilation >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java,v >retrieving revision 1.45 >diff -u -r1.45 SourceTypeConverter.java >--- model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 29 Mar 2006 03:08:52 -0000 1.45 >+++ model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 11 Apr 2006 11:22:44 -0000 >@@ -672,6 +672,7 @@ > switch (currentChar) { > case Signature.C_BOOLEAN : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.BOOLEAN.simpleName, ((long) start << 32) + end); > else >@@ -680,6 +681,7 @@ > break; > case Signature.C_BYTE : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.BYTE.simpleName, ((long) start << 32) + end); > else >@@ -688,6 +690,7 @@ > break; > case Signature.C_CHAR : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.CHAR.simpleName, ((long) start << 32) + end); > else >@@ -696,6 +699,7 @@ > break; > case Signature.C_DOUBLE : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.DOUBLE.simpleName, ((long) start << 32) + end); > else >@@ -704,6 +708,7 @@ > break; > case Signature.C_FLOAT : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.FLOAT.simpleName, ((long) start << 32) + end); > else >@@ -712,6 +717,7 @@ > break; > case Signature.C_INT : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.INT.simpleName, ((long) start << 32) + end); > else >@@ -720,6 +726,7 @@ > break; > case Signature.C_LONG : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.LONG.simpleName, ((long) start << 32) + end); > else >@@ -728,6 +735,7 @@ > break; > case Signature.C_SHORT : > if (!nameStarted) { >+ this.namePos++; > if (dim == 0) > return new SingleTypeReference(TypeBinding.SHORT.simpleName, ((long) start << 32) + end); > else >@@ -736,6 +744,7 @@ > break; > case Signature.C_VOID : > if (!nameStarted) { >+ this.namePos++; > new SingleTypeReference(TypeBinding.VOID.simpleName, ((long) start << 32) + end); > } > break;
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 135296
: 38278