ASF Bugzilla – Attachment 25894 Details for
Bug 49758
[Patch] Generics warnings - rawtypes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix up some raw type warnings
rawtypes.patch (text/plain), 12.83 KB, created by
Sebb
on 2010-08-16 13:20:09 UTC
(
hide
)
Description:
Fix up some raw type warnings
Filename:
MIME Type:
Creator:
Sebb
Created:
2010-08-16 13:20:09 UTC
Size:
12.83 KB
patch
obsolete
>Index: java/javax/annotation/Resource.java >=================================================================== >--- java/javax/annotation/Resource.java (revision 986046) >+++ java/javax/annotation/Resource.java (working copy) >@@ -32,7 +32,7 @@ > 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; >Index: java/javax/ejb/EJB.java >=================================================================== >--- java/javax/ejb/EJB.java (revision 986046) >+++ java/javax/ejb/EJB.java (working copy) >@@ -29,7 +29,7 @@ > 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 ""; >Index: java/javax/el/BeanELResolver.java >=================================================================== >--- java/javax/el/BeanELResolver.java (revision 986046) >+++ java/javax/el/BeanELResolver.java (working copy) >@@ -231,7 +231,7 @@ > } > > // Can't use Class<?> because API needs to match specification >- public @SuppressWarnings("unchecked") Class getPropertyType() { >+ public @SuppressWarnings("rawtypes") Class getPropertyType() { > return this.type; > } > >Index: java/javax/el/ELContext.java >=================================================================== >--- java/javax/el/ELContext.java (revision 986046) >+++ java/javax/el/ELContext.java (working copy) >@@ -40,7 +40,7 @@ > } > > // 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 @@ > } > > // 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(); >Index: java/javax/el/ResourceBundleELResolver.java >=================================================================== >--- java/javax/el/ResourceBundleELResolver.java (revision 986046) >+++ java/javax/el/ResourceBundleELResolver.java (working copy) >@@ -101,7 +101,7 @@ > > @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>(); >Index: java/javax/servlet/ServletRequestWrapper.java >=================================================================== >--- java/javax/servlet/ServletRequestWrapper.java (revision 986046) >+++ java/javax/servlet/ServletRequestWrapper.java (working copy) >@@ -432,7 +432,7 @@ > */ > @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; > } >Index: java/javax/servlet/ServletResponseWrapper.java >=================================================================== >--- java/javax/servlet/ServletResponseWrapper.java (revision 986046) >+++ java/javax/servlet/ServletResponseWrapper.java (working copy) >@@ -226,7 +226,7 @@ > */ > @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; > } >Index: java/javax/servlet/annotation/HandlesTypes.java >=================================================================== >--- java/javax/servlet/annotation/HandlesTypes.java (revision 986046) >+++ java/javax/servlet/annotation/HandlesTypes.java (working copy) >@@ -29,7 +29,7 @@ > */ > @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 { > > /** >Index: java/javax/servlet/jsp/el/ExpressionEvaluator.java >=================================================================== >--- java/javax/servlet/jsp/el/ExpressionEvaluator.java (revision 986046) >+++ java/javax/servlet/jsp/el/ExpressionEvaluator.java (working copy) >@@ -83,7 +83,7 @@ > * 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 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; > } >Index: java/javax/servlet/jsp/el/ImplicitObjectELResolver.java >=================================================================== >--- java/javax/servlet/jsp/el/ImplicitObjectELResolver.java (revision 986046) >+++ java/javax/servlet/jsp/el/ImplicitObjectELResolver.java (working copy) >@@ -121,7 +121,7 @@ > } > > @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) { >Index: java/javax/servlet/jsp/tagext/TagSupport.java >=================================================================== >--- java/javax/servlet/jsp/tagext/TagSupport.java (revision 986046) >+++ java/javax/servlet/jsp/tagext/TagSupport.java (working copy) >@@ -73,7 +73,7 @@ > */ > public static final Tag findAncestorWithClass(Tag from, > // TCK signature test fails with generics >- @SuppressWarnings("unchecked") >+ @SuppressWarnings("rawtypes") > Class klass) { > boolean isInterface = false; > >Index: java/javax/xml/ws/WebServiceRef.java >=================================================================== >--- java/javax/xml/ws/WebServiceRef.java (revision 986046) >+++ java/javax/xml/ws/WebServiceRef.java (working copy) >@@ -28,9 +28,9 @@ > > 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 ""; >Index: java/org/apache/el/lang/EvaluationContext.java >=================================================================== >--- java/org/apache/el/lang/EvaluationContext.java (revision 986046) >+++ java/org/apache/el/lang/EvaluationContext.java (working copy) >@@ -55,7 +55,7 @@ > > @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 @@ > > @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); > } >Index: java/org/apache/el/parser/AstValue.java >=================================================================== >--- java/org/apache/el/parser/AstValue.java (revision 986046) >+++ java/org/apache/el/parser/AstValue.java (working copy) >@@ -227,7 +227,7 @@ > @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 @@ > @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); >Index: java/org/apache/jasper/el/ELContextWrapper.java >=================================================================== >--- java/org/apache/jasper/el/ELContextWrapper.java (revision 986046) >+++ java/org/apache/jasper/el/ELContextWrapper.java (working copy) >@@ -55,7 +55,7 @@ > } > > @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 @@ > } > > @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); > } >Index: java/org/apache/jasper/el/ExpressionEvaluatorImpl.java >=================================================================== >--- java/org/apache/jasper/el/ExpressionEvaluatorImpl.java (revision 986046) >+++ java/org/apache/jasper/el/ExpressionEvaluatorImpl.java (working copy) >@@ -36,7 +36,7 @@ > > @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 @@ > > @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 { >Index: java/org/apache/naming/resources/DirContextURLConnection.java >=================================================================== >--- java/org/apache/naming/resources/DirContextURLConnection.java (revision 986046) >+++ java/org/apache/naming/resources/DirContextURLConnection.java (working copy) >@@ -350,7 +350,7 @@ > /** > * 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 {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49758
: 25894