harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r414009 - /incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/FeatureDescriptor.java
Date Wed, 14 Jun 2006 00:22:00 GMT
Author: ndbeyer
Date: Tue Jun 13 17:21:59 2006
New Revision: 414009

URL: http://svn.apache.org/viewvc?rev=414009&view=rev
Log:
Make a copy of the keys for enumeration.

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=414009&r1=414008&r2=414009&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
Tue Jun 13 17:21:59 2006
@@ -19,6 +19,7 @@
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.Map;
 
 /**
@@ -85,7 +86,8 @@
      * @return An instance of {@link Enumeration}.
      */
     public Enumeration<String> attributeNames() {
-        return Collections.enumeration(values.keySet());
+        //Create a new list, so that the references are copied
+        return Collections.enumeration(new LinkedList<String>(values.keySet()));
     }
 
     /**



Mime
View raw message