harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r413531 - /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/FeatureDescriptor.java
Date Sun, 11 Jun 2006 21:15:43 GMT
Author: tellison
Date: Sun Jun 11 14:15:43 2006
New Revision: 413531

URL: http://svn.apache.org/viewvc?rev=413531&view=rev
Log:
Convert attributeNames to return an enum of strings.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/FeatureDescriptor.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/FeatureDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/FeatureDescriptor.java?rev=413531&r1=413530&r2=413531&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/FeatureDescriptor.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/FeatureDescriptor.java
Sun Jun 11 14:15:43 2006
@@ -24,6 +24,7 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.StringTokenizer;
+import java.util.Vector;
 
 /**
  * @author Maxim V. Berkultsev
@@ -70,18 +71,10 @@
     /**
      * @com.intel.drl.spec_ref
      */
-    public Enumeration attributeNames() {
-        String attributeNamesStr = "";
-        Iterator i = values.keySet().iterator();
-        while(i.hasNext()) {
-            String attributeName = (String) i.next();
-            if(attributeNamesStr.equals("")) {
-                attributeNamesStr += attributeName;
-            } else {
-                attributeNamesStr += ' ' + attributeName;
-            }
-        }
-        return new StringTokenizer(attributeNamesStr);
+    public Enumeration<String> attributeNames() {
+        Vector<String> attribNames = new Vector<String>(values.size());
+        attribNames.addAll(values.keySet());
+        return attribNames.elements();
     }
 
     /**



Mime
View raw message