aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-03-22 06:07:51 (EDT)
committerSatyam Kandula2012-03-22 06:07:51 (EDT)
commit306045e2789dbdf9b489ec4e706fbb1234edd021 (patch)
tree347fd3470134a83d4b60d3cde30206e69bae92ad
parent658401f569883f80a8cae1166f69e06bf33baaf9 (diff)
downloadeclipse.jdt.core-306045e2789dbdf9b489ec4e706fbb1234edd021.zip
eclipse.jdt.core-306045e2789dbdf9b489ec4e706fbb1234edd021.tar.gz
eclipse.jdt.core-306045e2789dbdf9b489ec4e706fbb1234edd021.tar.bz2
Fix for 374538: Fix compilation of org.eclipse.jdt.compiler.apt.tests onv20120322-1007
Java 7
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elements/ElementProc.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elements/ElementProc.java b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elements/ElementProc.java
index 8417ef2..0570c89 100644
--- a/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elements/ElementProc.java
+++ b/org.eclipse.jdt.compiler.apt.tests/processors/org/eclipse/jdt/compiler/apt/tests/processors/elements/ElementProc.java
@@ -7,6 +7,7 @@
*
* Contributors:
* wharley@bea.com - initial API and implementation
+ * akurtakov@gmail.com - fix compilation with Java 7
*
*******************************************************************************/
@@ -918,6 +919,9 @@ public class ElementProc extends BaseProcessor {
reportError("examineGetAnnotation: annoArrayType.value() should have thrown a MirroredTypesException but instead returned " + contents);
return false;
}
+ catch (MirroredTypeException mte) {
+ // ignore, because javac incorrectly throws this; see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6519115
+ }
catch (MirroredTypesException mte) {
List<? extends TypeMirror> clazzMirrors = mte.getTypeMirrors();
if (null == clazzMirrors || clazzMirrors.size() != 2) {
@@ -925,9 +929,6 @@ public class ElementProc extends BaseProcessor {
return false;
}
}
- catch (MirroredTypeException mte) {
- // ignore, because javac incorrectly throws this; see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6519115
- }
return true;
}