Miscellaneous compiler cleanup.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1485 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jjs/InternalCompilerException.java b/dev/core/src/com/google/gwt/dev/jjs/InternalCompilerException.java
index 2f1fd07..5feb504 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/InternalCompilerException.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/InternalCompilerException.java
@@ -15,7 +15,6 @@
*/
package com.google.gwt.dev.jjs;
-
import java.util.ArrayList;
import java.util.List;
@@ -66,9 +65,9 @@
/**
* Tracks if there's a pending addNode() to avoid recursion sickness.
*/
- private static final ThreadLocal pendingICE = new ThreadLocal();
+ private static final ThreadLocal<InternalCompilerException> pendingICE = new ThreadLocal<InternalCompilerException>();
- private final List nodeTrace = new ArrayList();
+ private final List<NodeInfo> nodeTrace = new ArrayList<NodeInfo>();
/**
* Constructs a new exception with the specified node, message, and cause.
@@ -98,9 +97,9 @@
* trace works.
*/
public void addNode(HasSourceInfo node) {
- InternalCompilerException other = (InternalCompilerException) pendingICE.get();
+ InternalCompilerException other = pendingICE.get();
if (other != null) {
- // Avoiding recursion sickness: Yet Another ICE must have occured while
+ // Avoiding recursion sickness: Yet Another ICE must have occurred while
// generating info for a prior ICE. Just bail!
return;
}
@@ -140,7 +139,7 @@
* list is the node that was most specifically being visited when the
* exception was thrown.
*/
- public List getNodeTrace() {
+ public List<NodeInfo> getNodeTrace() {
return nodeTrace;
}
diff --git a/user/test/com/google/gwt/dev/jjs/test/Coverage.java b/user/test/com/google/gwt/dev/jjs/test/Coverage.java
index a797deb..3302e38 100644
--- a/user/test/com/google/gwt/dev/jjs/test/Coverage.java
+++ b/user/test/com/google/gwt/dev/jjs/test/Coverage.java
@@ -94,7 +94,7 @@
new SecondMain().new FunkyInner();
new NamedLocal().new NamedLocalSub().foo();
}
-
+
public void bar() {
}
@@ -324,13 +324,10 @@
assertTrue(i >= j);
}
- /**
- * TODO(5.0) implement for each
- */
private void testForeachStatement() {
- // for (int q : ia) {
- // i = q;
- // }
+ for (int q : ia) {
+ i = q;
+ }
}
private void testForStatement() {