Reapplying r5789 to remove warnings from JsParser. git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5801 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/js/JsParser.java b/dev/core/src/com/google/gwt/dev/js/JsParser.java index aa2826c..4f6e463 100644 --- a/dev/core/src/com/google/gwt/dev/js/JsParser.java +++ b/dev/core/src/com/google/gwt/dev/js/JsParser.java
@@ -346,6 +346,8 @@ */ private JsNameRef mapAsPropertyNameRef(Node nameRefNode) throws JsParserException { + // Javac 1.6.0_01 doesn't like the cast below if this is parameterized + @SuppressWarnings("unchecked") JsNode unknown = map(nameRefNode); // This is weird, but for "a.b", the rhino AST calls "b" a string literal. // However, since we know it's for a PROPGET, we can unstringliteralize it. @@ -563,6 +565,8 @@ } private JsExpression mapExpression(Node exprNode) throws JsParserException { + // Javac 1.6.0_01 doesn't like the cast below if this is parameterized + @SuppressWarnings("unchecked") JsNode unknown = map(exprNode); if (unknown instanceof JsExpression) { return (JsExpression) unknown; @@ -623,7 +627,8 @@ JsFor toFor = new JsFor(makeSourceInfo(forNode)); // The first item is either an expression or a JsVars. - // + // Javac 1.6.0_01 doesn't like the cast below if this is parameterized + @SuppressWarnings("unchecked") JsNode initThingy = map(fromInit); if (initThingy != null) { if (initThingy instanceof JsVars) { @@ -839,6 +844,8 @@ private JsExpression mapOptionalExpression(Node exprNode) throws JsParserException { + // Javac 1.6.0_01 doesn't like the cast below if this is parameterized + @SuppressWarnings("unchecked") JsNode unknown = map(exprNode); if (unknown != null) { if (unknown instanceof JsExpression) { @@ -984,6 +991,8 @@ } private JsStatement mapStatement(Node nodeStmt) throws JsParserException { + // Javac 1.6.0_01 doesn't like the cast below if this is parameterized + @SuppressWarnings("unchecked") JsNode unknown = map(nodeStmt); if (unknown != null) { if (unknown instanceof JsStatement) {