Fix the remaining Eclipse warnings in the non-generated classes
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Jan 2010 13:11:52 +0000 (13:11 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 10 Jan 2010 13:11:52 +0000 (13:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@897635 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/el/parser/AstIdentifier.java
java/org/apache/el/parser/AstValue.java
java/org/apache/el/parser/SimpleNode.java

index 5cefbb3..540bee8 100644 (file)
@@ -91,6 +91,7 @@ public final class AstIdentifier extends SimpleNode {
         ctx.getELResolver().setValue(ctx, null, this.image, value);
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public Object invoke(EvaluationContext ctx, Class[] paramTypes,
             Object[] paramValues) throws ELException {
@@ -98,6 +99,7 @@ public final class AstIdentifier extends SimpleNode {
     }
     
 
+    @SuppressWarnings("unchecked")
     @Override
     public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
             throws ELException {
index 0371522..9a5cb5d 100644 (file)
@@ -142,9 +142,11 @@ public final class AstValue extends SimpleNode {
         Class<?> targetClass = resolver.getType(ctx, t.base, t.property);
         if (COERCE_TO_ZERO == true
                 || !isAssignable(value, targetClass)) {
-            value = ELSupport.coerceToType(value, targetClass);
+            resolver.setValue(ctx, t.base, t.property,
+                    ELSupport.coerceToType(value, targetClass));
+        } else {
+            resolver.setValue(ctx, t.base, t.property, value);
         }
-        resolver.setValue(ctx, t.base, t.property, value);
     }
 
     private boolean isAssignable(Object value, Class<?> targetClass) {
@@ -159,6 +161,7 @@ public final class AstValue extends SimpleNode {
     }
 
 
+    @SuppressWarnings("unchecked")
     @Override
     public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes)
             throws ELException {
@@ -168,6 +171,7 @@ public final class AstValue extends SimpleNode {
                 .getParameterTypes());
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public Object invoke(EvaluationContext ctx, Class[] paramTypes,
             Object[] paramValues) throws ELException {
index 79bef0b..84e76b8 100644 (file)
@@ -45,9 +45,11 @@ public abstract class SimpleNode extends ELSupport implements Node {
     }
 
     public void jjtOpen() {
+        // NOOP by default
     }
 
     public void jjtClose() {
+        // NOOP by default
     }
 
     public void jjtSetParent(Node n) {
@@ -151,11 +153,13 @@ public abstract class SimpleNode extends ELSupport implements Node {
         }
     }
 
+    @SuppressWarnings("unchecked")
     public Object invoke(EvaluationContext ctx, Class[] paramTypes,
             Object[] paramValues) throws ELException {
         throw new UnsupportedOperationException();
     }
 
+    @SuppressWarnings("unchecked")
     public MethodInfo getMethodInfo(EvaluationContext ctx,
             Class[] paramTypes) throws ELException {
         throw new UnsupportedOperationException();