You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/01/30 18:51:04 UTC

[tomcat] 02/02: Use generics now they are used in the API

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 2becffb3d2cc4b27630d16f0351cb1823b971e5b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jan 27 21:56:08 2020 +0000

    Use generics now they are used in the API
---
 java/org/apache/el/lang/EvaluationContext.java        | 7 ++-----
 java/org/apache/jasper/el/ELContextWrapper.java       | 5 ++---
 java/org/apache/jasper/runtime/JspContextWrapper.java | 4 ++--
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/el/lang/EvaluationContext.java b/java/org/apache/el/lang/EvaluationContext.java
index fad4c4f..6f39efc 100644
--- a/java/org/apache/el/lang/EvaluationContext.java
+++ b/java/org/apache/el/lang/EvaluationContext.java
@@ -58,8 +58,7 @@ public final class EvaluationContext extends ELContext {
     }
 
     @Override
-    // Can't use Class<?> because API needs to match specification in superclass
-    public Object getContext(@SuppressWarnings("rawtypes") Class key) {
+    public Object getContext(Class<?> key) {
         return elContext.getContext(key);
     }
 
@@ -74,9 +73,7 @@ public final class EvaluationContext extends ELContext {
     }
 
     @Override
-    // Can't use Class<?> because API needs to match specification in superclass
-    public void putContext(@SuppressWarnings("rawtypes") Class key,
-            Object contextObject) {
+    public void putContext(Class<?> key, Object contextObject) {
         elContext.putContext(key, contextObject);
     }
 
diff --git a/java/org/apache/jasper/el/ELContextWrapper.java b/java/org/apache/jasper/el/ELContextWrapper.java
index 7c5abcb..d19dfe8 100644
--- a/java/org/apache/jasper/el/ELContextWrapper.java
+++ b/java/org/apache/jasper/el/ELContextWrapper.java
@@ -55,7 +55,7 @@ public final class ELContextWrapper extends ELContext {
     }
 
     @Override
-    public Object getContext(@SuppressWarnings("rawtypes") Class key) {
+    public Object getContext(Class<?> key) {
         return this.target.getContext(key);
     }
 
@@ -70,8 +70,7 @@ public final class ELContextWrapper extends ELContext {
     }
 
     @Override
-    public void putContext(@SuppressWarnings("rawtypes") Class key,
-            Object contextObject) throws NullPointerException {
+    public void putContext(Class<?> key, Object contextObject) throws NullPointerException {
         this.target.putContext(key, contextObject);
     }
 
diff --git a/java/org/apache/jasper/runtime/JspContextWrapper.java b/java/org/apache/jasper/runtime/JspContextWrapper.java
index 0620d56..d7c0956 100644
--- a/java/org/apache/jasper/runtime/JspContextWrapper.java
+++ b/java/org/apache/jasper/runtime/JspContextWrapper.java
@@ -549,12 +549,12 @@ public class JspContextWrapper extends PageContext implements VariableResolver {
         }
 
         @Override
-        public void putContext(@SuppressWarnings("rawtypes") Class key, Object contextObject) {
+        public void putContext(Class<?> key, Object contextObject) {
             wrapped.putContext(key, contextObject);
         }
 
         @Override
-        public Object getContext(@SuppressWarnings("rawtypes") Class key) {
+        public Object getContext(Class<?> key) {
             if (key == JspContext.class) {
                 return pageContext;
             }


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