harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r495302 - in /harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/beancontext/BeanContextSupport.java test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java
Date Thu, 11 Jan 2007 17:34:05 GMT
Author: ayza
Date: Thu Jan 11 09:34:03 2007
New Revision: 495302

URL: http://svn.apache.org/viewvc?view=rev&rev=495302
Log:
The patch for HARMONY-2350 was applied ([classlib][beans] Method addAll() in class BeanContextSupport
doesn't throw UnsupportedOperationException)

Modified:
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java?view=diff&rev=495302&r1=495301&r2=495302
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
Thu Jan 11 09:34:03 2007
@@ -250,33 +250,7 @@
     }
 
     public boolean addAll(Collection c) {
-
-        Collection<Object> col = new ArrayList<Object>();
-
-        // Add children one by one
-        for (Iterator i = c.iterator(); i.hasNext();) {
-            try {
-                Object next = i.next();
-
-                if (add(next)) {
-                    col.add(next);
-                }
-            } catch (Exception e) {
-
-                // Roll back changes but first check if it's already rolling
-                // back to avoid infinitive action
-                if (!this.rollingBack) {
-                    this.rollingBack = true;
-                    removeAll(col);
-                } else {
-                    this.rollingBack = false;
-                }
-
-                return false;
-            }
-        }
-
-        return true;
+        throw new UnsupportedOperationException();
     }
 
     public void addBeanContextMembershipListener(

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java?view=diff&rev=495302&r1=495301&r2=495302
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextSupportTest.java
Thu Jan 11 09:34:03 2007
@@ -555,6 +555,7 @@
         support.records.assertRecord("initialize", null);
 
         try {
+            //Regression for HARMONY-2350
             support.addAll(Collections.EMPTY_LIST);
             fail();
         } catch (UnsupportedOperationException e) {



Mime
View raw message