Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 079A074BF for ; Fri, 28 Oct 2011 03:51:50 +0000 (UTC) Received: (qmail 89325 invoked by uid 500); 28 Oct 2011 03:51:49 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 89067 invoked by uid 500); 28 Oct 2011 03:51:48 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 89058 invoked by uid 99); 28 Oct 2011 03:51:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2011 03:51:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2011 03:51:45 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3E8C523889DA for ; Fri, 28 Oct 2011 03:51:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1190147 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java Date: Fri, 28 Oct 2011 03:51:24 -0000 To: commits@commons.apache.org From: dbrosius@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111028035124.3E8C523889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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());