tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r987958 - in /tomcat/trunk: java/javax/annotation/ java/javax/ejb/ java/javax/el/ java/javax/servlet/ java/javax/servlet/annotation/ java/javax/servlet/jsp/el/ java/javax/servlet/jsp/tagext/ java/javax/xml/ws/ java/org/apache/el/lang/ java/...
Date Sun, 22 Aug 2010 23:11:19 GMT
Author: markt
Date: Sun Aug 22 23:11:18 2010
New Revision: 987958

URL: http://svn.apache.org/viewvc?rev=987958&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49758
Fix generics warnings exposed by a fix in Eclipse 3.6. Patch provided by sebb.

Modified:
    tomcat/trunk/java/javax/annotation/Resource.java
    tomcat/trunk/java/javax/ejb/EJB.java
    tomcat/trunk/java/javax/el/BeanELResolver.java
    tomcat/trunk/java/javax/el/ELContext.java
    tomcat/trunk/java/javax/el/ResourceBundleELResolver.java
    tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java
    tomcat/trunk/java/javax/servlet/ServletResponseWrapper.java
    tomcat/trunk/java/javax/servlet/annotation/HandlesTypes.java
    tomcat/trunk/java/javax/servlet/jsp/el/ExpressionEvaluator.java
    tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
    tomcat/trunk/java/javax/servlet/jsp/tagext/TagSupport.java
    tomcat/trunk/java/javax/xml/ws/WebServiceRef.java
    tomcat/trunk/java/org/apache/el/lang/EvaluationContext.java
    tomcat/trunk/java/org/apache/el/parser/AstValue.java
    tomcat/trunk/java/org/apache/jasper/el/ELContextWrapper.java
    tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java
    tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/javax/annotation/Resource.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/Resource.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/annotation/Resource.java (original)
+++ tomcat/trunk/java/javax/annotation/Resource.java Sun Aug 22 23:11:18 2010
@@ -32,7 +32,7 @@ public @interface Resource {
         APPLICATION
     }
     public String name() default "";
-    @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match
specification
+    @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match
specification
     public Class type() default Object.class;
     public AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
     public boolean shareable() default true;

Modified: tomcat/trunk/java/javax/ejb/EJB.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/ejb/EJB.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/ejb/EJB.java (original)
+++ tomcat/trunk/java/javax/ejb/EJB.java Sun Aug 22 23:11:18 2010
@@ -29,7 +29,7 @@ import java.lang.annotation.Target;
 public @interface EJB {
    String name() default "";
    String description() default "";
-   @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match
specification
+   @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match specification
    Class beanInterface() default java.lang.Object.class;
    String beanName() default "";
    String mappedName() default "";

Modified: tomcat/trunk/java/javax/el/BeanELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/trunk/java/javax/el/BeanELResolver.java Sun Aug 22 23:11:18 2010
@@ -231,7 +231,7 @@ public class BeanELResolver extends ELRe
         }
 
         // Can't use Class<?> because API needs to match specification
-        public @SuppressWarnings("unchecked") Class getPropertyType() {
+        public @SuppressWarnings("rawtypes") Class getPropertyType() {
             return this.type;
         }
 

Modified: tomcat/trunk/java/javax/el/ELContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELContext.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/ELContext.java (original)
+++ tomcat/trunk/java/javax/el/ELContext.java Sun Aug 22 23:11:18 2010
@@ -40,7 +40,7 @@ public abstract class ELContext {
     }
     
     // Can't use Class<?> because API needs to match specification
-    public Object getContext(@SuppressWarnings("unchecked") Class key) {
+    public Object getContext(@SuppressWarnings("rawtypes") Class key) {
         if (this.map == null) {
             return null;
         }
@@ -48,7 +48,7 @@ public abstract class ELContext {
     }
     
     // Can't use Class<?> because API needs to match specification
-    public void putContext(@SuppressWarnings("unchecked") Class key,
+    public void putContext(@SuppressWarnings("rawtypes") Class key,
             Object contextObject) throws NullPointerException {
         if (key == null || contextObject == null) {
             throw new NullPointerException();

Modified: tomcat/trunk/java/javax/el/ResourceBundleELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ResourceBundleELResolver.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/ResourceBundleELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ResourceBundleELResolver.java Sun Aug 22 23:11:18 2010
@@ -101,7 +101,7 @@ public class ResourceBundleELResolver ex
 
     @Override
     // Can't use Iterator<FeatureDescriptor> because API needs to match specification
-    public @SuppressWarnings("unchecked") Iterator getFeatureDescriptors(
+    public @SuppressWarnings({ "unchecked", "rawtypes" }) Iterator getFeatureDescriptors(
             ELContext context, Object base) {
         if (base instanceof ResourceBundle) {
             List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();

Modified: tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletRequestWrapper.java Sun Aug 22 23:11:18 2010
@@ -432,7 +432,7 @@ public class ServletRequestWrapper imple
      */
     @SuppressWarnings("unchecked")
     // Spec API does not use generics
-    public boolean isWrapperFor(Class wrappedType) {
+    public boolean isWrapperFor(@SuppressWarnings("rawtypes") Class wrappedType) {
         if (wrappedType.isAssignableFrom(request.getClass())) {
             return true;
         }

Modified: tomcat/trunk/java/javax/servlet/ServletResponseWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletResponseWrapper.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ServletResponseWrapper.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletResponseWrapper.java Sun Aug 22 23:11:18 2010
@@ -226,7 +226,7 @@ public class ServletResponseWrapper impl
      */
     @SuppressWarnings("unchecked")
     // Spec API does not use generics
-    public boolean isWrapperFor(Class wrappedType) {
+    public boolean isWrapperFor(@SuppressWarnings("rawtypes") Class wrappedType) {
         if (wrappedType.isAssignableFrom(response.getClass())) {
             return true;
         }

Modified: tomcat/trunk/java/javax/servlet/annotation/HandlesTypes.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/annotation/HandlesTypes.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/annotation/HandlesTypes.java (original)
+++ tomcat/trunk/java/javax/servlet/annotation/HandlesTypes.java Sun Aug 22 23:11:18 2010
@@ -29,7 +29,7 @@ import java.lang.annotation.Target;
  */
 @Target({ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
-@SuppressWarnings("unchecked") // Spec API does not use generics
+@SuppressWarnings("rawtypes") // Spec API does not use generics
 public @interface HandlesTypes {
 
     /**

Modified: tomcat/trunk/java/javax/servlet/jsp/el/ExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/el/ExpressionEvaluator.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/jsp/el/ExpressionEvaluator.java (original)
+++ tomcat/trunk/java/javax/servlet/jsp/el/ExpressionEvaluator.java Sun Aug 22 23:11:18 2010
@@ -83,7 +83,7 @@ public abstract class ExpressionEvaluato
      *                Thrown if parsing errors were found.
      */
     public abstract Expression parseExpression(String expression,
-            @SuppressWarnings("unchecked")// TCK signature fails with generics
+            @SuppressWarnings("rawtypes")// TCK signature fails with generics
             Class expectedType, FunctionMapper fMapper) throws ELException;
 
     /**
@@ -109,7 +109,7 @@ public abstract class ExpressionEvaluato
      */
     public abstract Object evaluate(
             String expression,
-            @SuppressWarnings("unchecked")// TCK signature fails with generics
+            @SuppressWarnings("rawtypes")// TCK signature fails with generics
             Class expectedType, VariableResolver vResolver,
             FunctionMapper fMapper) throws ELException;
 }

Modified: tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java (original)
+++ tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java Sun Aug 22 23:11:18
2010
@@ -121,7 +121,7 @@ public class ImplicitObjectELResolver ex
     }
 
     @Override
-    @SuppressWarnings("unchecked") // TCK signature test fails with generics
+    @SuppressWarnings({ "unchecked", "rawtypes" }) // TCK signature test fails with generics
     public Class getType(ELContext context, Object base, Object property)
             throws NullPointerException, PropertyNotFoundException, ELException {
         if (context == null) {

Modified: tomcat/trunk/java/javax/servlet/jsp/tagext/TagSupport.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/tagext/TagSupport.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/jsp/tagext/TagSupport.java (original)
+++ tomcat/trunk/java/javax/servlet/jsp/tagext/TagSupport.java Sun Aug 22 23:11:18 2010
@@ -73,7 +73,7 @@ public class TagSupport implements Itera
      */
     public static final Tag findAncestorWithClass(Tag from,
             // TCK signature test fails with generics
-            @SuppressWarnings("unchecked")
+            @SuppressWarnings("rawtypes")
             Class klass) {
         boolean isInterface = false;
 

Modified: tomcat/trunk/java/javax/xml/ws/WebServiceRef.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/xml/ws/WebServiceRef.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/javax/xml/ws/WebServiceRef.java (original)
+++ tomcat/trunk/java/javax/xml/ws/WebServiceRef.java Sun Aug 22 23:11:18 2010
@@ -28,9 +28,9 @@ import java.lang.annotation.Target;
 
 public @interface WebServiceRef {
     public String name() default "";
-    @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match
specification
+    @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match
specification
     public Class type() default java.lang.Object.class;
-    @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match
specification
+    @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match
specification
     public Class value() default java.lang.Object.class;
     public String wsdlLocation() default "";
     public String mappedName() default "";

Modified: tomcat/trunk/java/org/apache/el/lang/EvaluationContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/EvaluationContext.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/lang/EvaluationContext.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/EvaluationContext.java Sun Aug 22 23:11:18 2010
@@ -55,7 +55,7 @@ public final class EvaluationContext ext
 
     @Override
     // Can't use Class<?> because API needs to match specification in superclass
-    public Object getContext(@SuppressWarnings("unchecked") Class key) {
+    public Object getContext(@SuppressWarnings("rawtypes") Class key) {
         return this.elContext.getContext(key);
     }
 
@@ -71,7 +71,7 @@ public final class EvaluationContext ext
 
     @Override
     // Can't use Class<?> because API needs to match specification in superclass
-    public void putContext(@SuppressWarnings("unchecked") Class key,
+    public void putContext(@SuppressWarnings("rawtypes") Class key,
             Object contextObject) {
         this.elContext.putContext(key, contextObject);
     }

Modified: tomcat/trunk/java/org/apache/el/parser/AstValue.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstValue.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/parser/AstValue.java (original)
+++ tomcat/trunk/java/org/apache/el/parser/AstValue.java Sun Aug 22 23:11:18 2010
@@ -227,7 +227,7 @@ public final class AstValue extends Simp
     @Override
     // Interface el.parser.Node uses raw types (and is auto-generated)
     public MethodInfo getMethodInfo(EvaluationContext ctx, 
-            @SuppressWarnings("unchecked") Class[] paramTypes)
+            @SuppressWarnings("rawtypes") Class[] paramTypes)
             throws ELException {
         Target t = getTarget(ctx);
         Method m = ReflectionUtil.getMethod(t.base, t.property, paramTypes);
@@ -238,7 +238,7 @@ public final class AstValue extends Simp
     @Override
     // Interface el.parser.Node uses a raw type (and is auto-generated)
     public Object invoke(EvaluationContext ctx, 
-            @SuppressWarnings("unchecked") Class[] paramTypes,
+            @SuppressWarnings("rawtypes") Class[] paramTypes,
             Object[] paramValues) throws ELException {
         
         Target t = getTarget(ctx);

Modified: tomcat/trunk/java/org/apache/jasper/el/ELContextWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/ELContextWrapper.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/el/ELContextWrapper.java (original)
+++ tomcat/trunk/java/org/apache/jasper/el/ELContextWrapper.java Sun Aug 22 23:11:18 2010
@@ -55,7 +55,7 @@ public final class ELContextWrapper exte
     }
 
     @Override
-    @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match
super-class specification
+    @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match
super-class specification
     public Object getContext(Class key) {
         return this.target.getContext(key);
     }
@@ -71,7 +71,7 @@ public final class ELContextWrapper exte
     }
 
     @Override
-    @SuppressWarnings("unchecked") // Can't use Class<?> because API needs to match
super-class specification
+    @SuppressWarnings("rawtypes") // Can't use Class<?> because API needs to match
super-class specification
     public void putContext(Class key, Object contextObject) throws NullPointerException {
         this.target.putContext(key, contextObject);
     }

Modified: tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/el/ExpressionEvaluatorImpl.java Sun Aug 22 23:11:18
2010
@@ -36,7 +36,7 @@ public final class ExpressionEvaluatorIm
 
     @Override
     public Expression parseExpression(String expression,
-            @SuppressWarnings("unchecked") // API does not use generics
+            @SuppressWarnings("rawtypes") // API does not use generics
             Class expectedType,
             FunctionMapper fMapper) throws ELException {
         try {
@@ -54,7 +54,7 @@ public final class ExpressionEvaluatorIm
 
     @Override
     public Object evaluate(String expression,
-            @SuppressWarnings("unchecked") // API does not use generics
+            @SuppressWarnings("rawtypes") // API does not use generics
             Class expectedType,
             VariableResolver vResolver, FunctionMapper fMapper)
             throws ELException {

Modified: tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java Sun Aug 22
23:11:18 2010
@@ -350,7 +350,7 @@ public class DirContextURLConnection 
     /**
      * Get object content.
      */
-    @SuppressWarnings("unchecked") // overridden method uses raw type Class[]
+    @SuppressWarnings("rawtypes") // overridden method uses raw type Class[]
     @Override
     public Object getContent(Class[] classes)
         throws IOException {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=987958&r1=987957&r2=987958&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Aug 22 23:11:18 2010
@@ -106,6 +106,10 @@
       <add>
         Extend Checkstyle validation checks to check import order. (markt) 
       </add>
+      <fix>
+        <bug>49758</bug>: Fix generics warnings exposed by a fix in Eclipse 3.6.
+        Patch provided by sebb. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message