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 237307 Details for
Bug 418920
[1.8] Failing tests with JRE8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
patch.patch (text/plain), 7.76 KB, created by
shankha banerjee
on 2013-11-08 06:32:24 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
shankha banerjee
Created:
2013-11-08 06:32:24 EST
Size:
7.76 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java >index a03ef8a..decc7cb 100644 >--- a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java >+++ b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elementutils/ElementUtilsProc.java >@@ -471,8 +471,8 @@ public class ElementUtilsProc extends BaseProcessor > "\n" + > " Javadoc on _fieldT1_private\n" + > " this line starts with two spaces, no asterisk\n" + >- " This line starts, contains\tand ends with a tab\t\n" + >- " This line starts with a space, tab, space, tab, space\n"); >+ " This line starts, contains\tand ends with a tab\t\n" + >+ " This line starts with a space, tab, space, tab, space\n"); > nameToDoc.put("fieldInt", null); > nameToDoc.put("method_T1", " Javadoc on F.method_T1\n"); > nameToDoc.put("method_String", null); >@@ -481,7 +481,7 @@ public class ElementUtilsProc extends BaseProcessor > nameToDoc.put("foo", "\n Creates a new instance of AllChecks \n"); > nameToDoc.put("bar", " @bar\t(int)\n"); > nameToDoc.put("bar2", "\t@bar2(int)\n"); >- nameToDoc.put("m", " Method\tm\n"); >+ nameToDoc.put("m", " Method\tm\n"); > nameToDoc.put("m1", "This is a comment for the method m1,\n" + > " it is on two lines\n"); > nameToDoc.put("m2", "Another comment - starts on first line and\n" + >@@ -510,6 +510,7 @@ public class ElementUtilsProc extends BaseProcessor > return false; > } > else if (expected != null) { >+ //Comparison takes place here. > if (!expected.equals(actual)) { > reportError("examineGetDocComment: Unexpected result from getDocComment(" + name + "): " + _elementUtils.getDocComment(e)); > return false; >diff --git a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/typeutils/TypeUtilsProc.java b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/typeutils/TypeUtilsProc.java >index 9485f86..fc52f8f 100644 >--- a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/typeutils/TypeUtilsProc.java >+++ b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/typeutils/TypeUtilsProc.java >@@ -273,25 +273,25 @@ public class TypeUtilsProc extends BaseProcessor > private boolean examineGetDeclaredTypeNested() { > TypeElement stringDecl = _elementUtils.getTypeElement(String.class.getName()); > TypeElement numberDecl = _elementUtils.getTypeElement(Number.class.getName()); >- TypeElement mapDecl = _elementUtils.getTypeElement("java.util.HashMap"); >- TypeElement iterDecl = _elementUtils.getTypeElement("java.util.HashMap.HashIterator"); >+ TypeElement elementOuter = _elementUtils.getTypeElement("targets.model.pd.Outer"); >+ TypeElement elementInner = _elementUtils.getTypeElement("targets.model.pd.Outer.Inner"); > DeclaredType stringType = _typeUtils.getDeclaredType(stringDecl); > DeclaredType numberType = _typeUtils.getDeclaredType(numberDecl); > ArrayType numberArrayType = _typeUtils.getArrayType(numberType); > >- // HashMap<String, Number[]> >- DeclaredType outerType = _typeUtils.getDeclaredType(mapDecl, stringType, numberArrayType); >- >- // HashMap<String, Number[]>.HashIterator<Number[]> >- DeclaredType decl = _typeUtils.getDeclaredType(outerType, iterDecl, new TypeMirror[] { numberArrayType }); >- >+ // Outer<T1, T2> ---> Outer<String, Number[]> >+ DeclaredType outerType = _typeUtils.getDeclaredType(elementOuter, stringType, numberArrayType); >+ >+ // Outer<T1, T2>.Inner<T2> ---> Outer<String, Number[]>.Inner<Number[]> >+ DeclaredType decl = _typeUtils.getDeclaredType(outerType, elementInner, new TypeMirror[] { numberArrayType }); >+ > List<? extends TypeMirror> args = decl.getTypeArguments(); > if (args.size() != 1) { >- reportError("Map<String, Number[]>.EntryIterator<Number[]> should have one argument but decl.getTypeArguments() returned " + args.size()); >+ reportError("Outer<String, Number[]>.Inner<Number[]> should have one argument but decl.getTypeArguments() returned " + args.size()); > return false; > } > if (!_typeUtils.isSameType(numberArrayType, args.get(0))) { >- reportError("First arg of Map<String, Number[]>.EntryIterator<Number[]> was expected to be Number[], but was: " + args.get(0)); >+ reportError("First arg of Outer<String, Number[]>.Inner<Number[]> was expected to be Number[], but was: " + args.get(0)); > return false; > } > return true; >diff --git a/org.eclipse.jdt.compiler.apt.tests/resources/targets/model/pd/Outer.java b/org.eclipse.jdt.compiler.apt.tests/resources/targets/model/pd/Outer.java >new file mode 100644 >index 0000000..5de08ef >--- /dev/null >+++ b/org.eclipse.jdt.compiler.apt.tests/resources/targets/model/pd/Outer.java >@@ -0,0 +1,12 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2013 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ *******************************************************************************/ >+package targets.model.pd; >+ >+class Outer<T1, T2> { >+ class Inner<T3> {} >+} >diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl.java >index 2bf2c55..e05bb16 100644 >--- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl.java >+++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/ElementsImpl.java >@@ -456,17 +456,6 @@ public class ElementsImpl implements Elements { > for (int i = 0, max = chars.length; i < max; i++) { > char c = chars[i]; > switch(c) { >- case '\t' : >- if (starsIndex == -1) { >- if (recordLeadingWhitespaces) { >- leadingWhitespaces += 8; >- } else { >- sb.append(c); >- } >- } else if (i >= starsIndex) { >- sb.append(c); >- } >- break; > case ' ' : > if (starsIndex == -1) { > if (recordLeadingWhitespaces) { >@@ -498,6 +487,10 @@ public class ElementsImpl implements Elements { > } > leadingWhitespaces = 0; > sb.append(c); >+ } else if (c == '\t') { >+ if (i >= starsIndex) { >+ sb.append(c); >+ } > } else if (c != '*' || i > starsIndex) { > sb.append(c); > } >diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava8Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava8Tests.java >index bab4577..8a98486 100644 >--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava8Tests.java >+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava8Tests.java >@@ -23,7 +23,6 @@ import junit.framework.Test; > import junit.framework.TestCase; > import junit.framework.TestSuite; > >-import org.eclipse.jdt.compiler.apt.tests.Java8ElementsTests; > import org.eclipse.jdt.core.tests.compiler.parser.ComplianceDiagnoseTest; > import org.eclipse.jdt.core.tests.dom.ASTConverter15JLS8Test; > import org.eclipse.jdt.core.tests.dom.ASTConverter18Test; >@@ -63,7 +62,7 @@ public class RunAllJava8Tests extends TestCase { > ASTConverter18Test.class, > ASTRewritingTest.class, > TypeBindingTests308.class, >- Java8ElementsTests.class, >+ org.eclipse.jdt.compiler.apt.tests.AllTests.class, > }; > } >
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 418920
:
237293
|
237296
|
237307
|
237359