tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1195955 - in /tomcat/trunk/java/org/apache/jasper: runtime/JspContextWrapper.java runtime/PageContextImpl.java util/Enumerator.java
Date Tue, 01 Nov 2011 12:24:53 GMT
Author: markt
Date: Tue Nov  1 12:24:53 2011
New Revision: 1195955

URL: http://svn.apache.org/viewvc?rev=1195955&view=rev
Log:
Deprecate o.a.jasper.util.Enumerator. Use Collections.enumeration()

Modified:
    tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
    tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
    tomcat/trunk/java/org/apache/jasper/util/Enumerator.java

Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java?rev=1195955&r1=1195954&r2=1195955&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/JspContextWrapper.java Tue Nov  1 12:24:53
2011
@@ -20,6 +20,7 @@ package org.apache.jasper.runtime;
 import java.io.IOException;
 import java.io.Writer;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -43,7 +44,6 @@ import javax.servlet.jsp.tagext.BodyCont
 import javax.servlet.jsp.tagext.VariableInfo;
 
 import org.apache.jasper.compiler.Localizer;
-import org.apache.jasper.util.Enumerator;
 
 /**
  * Implementation of a JSP Context Wrapper.
@@ -233,7 +233,7 @@ public class JspContextWrapper extends P
     @Override
     public Enumeration<String> getAttributeNamesInScope(int scope) {
         if (scope == PAGE_SCOPE) {
-            return new Enumerator<String>(pageAttributes.keySet().iterator());
+            return Collections.enumeration(pageAttributes.keySet());
         }
 
         return invokingJspCtxt.getAttributeNamesInScope(scope);

Modified: tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=1195955&r1=1195954&r2=1195955&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Tue Nov  1 12:24:53 2011
@@ -23,6 +23,7 @@ import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 
@@ -54,7 +55,6 @@ import org.apache.jasper.el.ExpressionEv
 import org.apache.jasper.el.FunctionMapperImpl;
 import org.apache.jasper.el.VariableResolverImpl;
 import org.apache.jasper.security.SecurityUtil;
-import org.apache.jasper.util.Enumerator;
 
 /**
  * Implementation of the PageContext class from the JSP spec. Also doubles as a
@@ -522,7 +522,7 @@ public class PageContextImpl extends Pag
     private Enumeration<String> doGetAttributeNamesInScope(int scope) {
         switch (scope) {
         case PAGE_SCOPE:
-            return new Enumerator<String>(attributes.keySet().iterator());
+            return Collections.enumeration(attributes.keySet());
 
         case REQUEST_SCOPE:
             return request.getAttributeNames();

Modified: tomcat/trunk/java/org/apache/jasper/util/Enumerator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/util/Enumerator.java?rev=1195955&r1=1195954&r2=1195955&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/util/Enumerator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/util/Enumerator.java Tue Nov  1 12:24:53 2011
@@ -35,7 +35,7 @@ import java.util.NoSuchElementException;
  * @author Craig R. McClanahan
  * @version $Id$
  */
-
+@Deprecated
 public final class Enumerator<T> implements Enumeration<T> {
 
 



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


Mime
View raw message