From: markt Date: Sun, 24 Oct 2010 11:55:10 +0000 (+0000) Subject: Allow Checkstyle's unused imports test to be used with the o.a.el package X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7f47e5bf24852ac29be0a1cce419b8188fd1f0e1;p=tomcat7.0 Allow Checkstyle's unused imports test to be used with the o.a.el package Fix Eclipse warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1026769 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/el/MethodExpressionImpl.java b/java/org/apache/el/MethodExpressionImpl.java index 1f45aca85..e3fea05d9 100644 --- a/java/org/apache/el/MethodExpressionImpl.java +++ b/java/org/apache/el/MethodExpressionImpl.java @@ -24,9 +24,6 @@ import java.io.ObjectOutput; import javax.el.ELContext; import javax.el.ELException; -import javax.el.ELResolver; -import javax.el.Expression; -import javax.el.ExpressionFactory; import javax.el.FunctionMapper; import javax.el.MethodExpression; import javax.el.MethodInfo; @@ -44,7 +41,7 @@ import org.apache.el.util.ReflectionUtil; * An Expression that refers to a method on an object. * *

- * The {@link ExpressionFactory#createMethodExpression} method + * The {@link javax.el.ExpressionFactory#createMethodExpression} method * can be used to parse an expression string and return a concrete instance * of MethodExpression that encapsulates the parsed expression. * The {@link FunctionMapper} is used at parse time, not evaluation time, @@ -52,13 +49,13 @@ import org.apache.el.util.ReflectionUtil; * However, the {@link ELContext} is needed at evaluation time.

* *

The {@link #getMethodInfo} and {@link #invoke} methods will evaluate the - * expression each time they are called. The {@link ELResolver} in the + * expression each time they are called. The {@link javax.el.ELResolver} in the * ELContext is used to resolve the top-level variables and to * determine the behavior of the . and [] - * operators. For any of the two methods, the {@link ELResolver#getValue} - * method is used to resolve all properties up to but excluding the last - * one. This provides the base object on which the method - * appears. If the base object is null, a + * operators. For any of the two methods, the + * {@link javax.el.ELResolver#getValue} method is used to resolve all properties + * up to but excluding the last one. This provides the base object + * on which the method appears. If the base object is null, a * NullPointerException must be thrown. At the last resolution, * the final property is then coerced to a String, * which provides the name of the method to be found. A method matching the @@ -67,7 +64,7 @@ import org.apache.el.util.ReflectionUtil; * MethodExpression).

* *

See the notes about comparison, serialization and immutability in - * the {@link Expression} javadocs. + * the {@link javax.el.Expression} javadocs. * * @see javax.el.ELResolver * @see javax.el.Expression @@ -286,6 +283,7 @@ public final class MethodExpressionImpl extends MethodExpression implements * * @see java.io.Externalizable#readExternal(java.io.ObjectInput) */ + @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.expr = in.readUTF(); @@ -304,6 +302,7 @@ public final class MethodExpressionImpl extends MethodExpression implements * * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput) */ + @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF(this.expr); out.writeUTF((this.expectedType != null) ? this.expectedType.getName() diff --git a/java/org/apache/el/MethodExpressionLiteral.java b/java/org/apache/el/MethodExpressionLiteral.java index dc771e42d..ebe985627 100644 --- a/java/org/apache/el/MethodExpressionLiteral.java +++ b/java/org/apache/el/MethodExpressionLiteral.java @@ -84,6 +84,7 @@ public class MethodExpressionLiteral extends MethodExpression implements Externa return true; } + @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.expr = in.readUTF(); String type = in.readUTF(); @@ -94,6 +95,7 @@ public class MethodExpressionLiteral extends MethodExpression implements Externa .readObject())); } + @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF(this.expr); out.writeUTF((this.expectedType != null) ? this.expectedType.getName() diff --git a/java/org/apache/el/ValueExpressionImpl.java b/java/org/apache/el/ValueExpressionImpl.java index 055026107..873d29589 100644 --- a/java/org/apache/el/ValueExpressionImpl.java +++ b/java/org/apache/el/ValueExpressionImpl.java @@ -24,9 +24,6 @@ import java.io.ObjectOutput; import javax.el.ELContext; import javax.el.ELException; -import javax.el.ELResolver; -import javax.el.Expression; -import javax.el.ExpressionFactory; import javax.el.FunctionMapper; import javax.el.PropertyNotFoundException; import javax.el.PropertyNotWritableException; @@ -58,7 +55,7 @@ import org.apache.el.util.ReflectionUtil; *

* *

- * The {@link ExpressionFactory#createValueExpression} method + * The {@link javax.el.ExpressionFactory#createValueExpression} method * can be used to parse an expression string and return a concrete instance * of ValueExpression that encapsulates the parsed expression. * The {@link FunctionMapper} is used at parse time, not evaluation time, @@ -67,20 +64,20 @@ import org.apache.el.util.ReflectionUtil; * *

The {@link #getValue}, {@link #setValue}, {@link #isReadOnly} and * {@link #getType} methods will evaluate the expression each time they are - * called. The {@link ELResolver} in the ELContext is used to - * resolve the top-level variables and to determine the behavior of the + * called. The {@link javax.el.ELResolver} in the ELContext is used + * to resolve the top-level variables and to determine the behavior of the * . and [] operators. For any of the four methods, - * the {@link ELResolver#getValue} method is used to resolve all properties - * up to but excluding the last one. This provides the base - * object. At the last resolution, the ValueExpression will - * call the corresponding {@link ELResolver#getValue}, - * {@link ELResolver#setValue}, {@link ELResolver#isReadOnly} or - * {@link ELResolver#getType} method, depending on which was called on - * the ValueExpression. + * the {@link javax.el.ELResolver#getValue} method is used to resolve all + * properties up to but excluding the last one. This provides the + * base object. At the last resolution, the + * ValueExpression will call the corresponding + * {@link javax.el.ELResolver#getValue}, {@link javax.el.ELResolver#setValue}, + * {@link javax.el.ELResolver#isReadOnly} or {@link javax.el.ELResolver#getType} + * method, depending on which was called on the ValueExpression. *

* *

See the notes about comparison, serialization and immutability in - * the {@link Expression} javadocs. + * the {@link javax.el.Expression} javadocs. * * @see javax.el.ELResolver * @see javax.el.Expression @@ -233,6 +230,7 @@ public final class ValueExpressionImpl extends ValueExpression implements return this.getNode().isReadOnly(ctx); } + @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.expr = in.readUTF(); @@ -259,6 +257,7 @@ public final class ValueExpressionImpl extends ValueExpression implements this.getNode().setValue(ctx, value); } + @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF(this.expr); out.writeUTF((this.expectedType != null) ? this.expectedType.getName() diff --git a/java/org/apache/el/ValueExpressionLiteral.java b/java/org/apache/el/ValueExpressionLiteral.java index a05510049..38d0b8ddf 100644 --- a/java/org/apache/el/ValueExpressionLiteral.java +++ b/java/org/apache/el/ValueExpressionLiteral.java @@ -104,12 +104,14 @@ public final class ValueExpressionLiteral extends ValueExpression implements return true; } + @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(this.value); out.writeUTF((this.expectedType != null) ? this.expectedType.getName() : ""); } + @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.value = in.readObject();