You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by db...@apache.org on 2011/10/28 05:51:24 UTC
svn commit: r1190147 -
/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
Author: dbrosius
Date: Fri Oct 28 03:51:23 2011
New Revision: 1190147
URL: http://svn.apache.org/viewvc?rev=1190147&view=rev
Log:
reduce cohesion in the interface, use Set vs. HashSet
Modified:
commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java?rev=1190147&r1=1190146&r2=1190147&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java Fri Oct 28 03:51:23 2011
@@ -18,6 +18,7 @@ package org.apache.commons.jxpath.servle
import java.util.Enumeration;
import java.util.HashSet;
+import java.util.Set;
import javax.servlet.ServletContext;
@@ -35,7 +36,7 @@ public class ServletContextHandler imple
private static final int DEFAULT_PROPERTY_COUNT = 16;
public String[] getPropertyNames(Object context) {
- HashSet list = new HashSet(DEFAULT_PROPERTY_COUNT);
+ Set list = new HashSet(DEFAULT_PROPERTY_COUNT);
collectPropertyNames(list, context);
return (String[]) list.toArray(new String[list.size()]);
}
@@ -45,7 +46,7 @@ public class ServletContextHandler imple
* @param set destination
* @param bean to read
*/
- protected void collectPropertyNames(HashSet set, Object bean) {
+ protected void collectPropertyNames(Set set, Object bean) {
Enumeration e = ((ServletContext) bean).getAttributeNames();
while (e.hasMoreElements()) {
set.add(e.nextElement());