harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aiva...@apache.org
Subject svn commit: r567562 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/undo/UndoManager.java test/api/java.injected/javax/swing/undo/CompoundEditTest.java test/api/java.injected/javax/swing/undo/UndoManagerTest.java
Date Mon, 20 Aug 2007 07:02:02 GMT
Author: aivanov
Date: Mon Aug 20 00:02:02 2007
New Revision: 567562

URL: http://svn.apache.org/viewvc?rev=567562&view=rev
Log:
Applying patch from HARMONY-2649: [classlib][swing] j.s.undo.UndoManager.edits has different
capacity

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/UndoManager.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/CompoundEditTest.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/UndoManagerTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/UndoManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/UndoManager.java?rev=567562&r1=567561&r2=567562&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/UndoManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/undo/UndoManager.java
Mon Aug 20 00:02:02 2007
@@ -43,6 +43,7 @@
     public UndoManager() {
         indexOfNextAdd = 0;
         limit          = DEFAULT_LIMIT;
+        edits.ensureCapacity(100);
     }
 
     public synchronized boolean addEdit(final UndoableEdit anEdit) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/CompoundEditTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/CompoundEditTest.java?rev=567562&r1=567561&r2=567562&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/CompoundEditTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/CompoundEditTest.java
Mon Aug 20 00:02:02 2007
@@ -447,4 +447,8 @@
         ce.undo();
         assertTrue(ce.canRedo());
     }
+
+    public void testEditsCapacity() { // Regression for HARMONY-2649
+        assertEquals(10, ce.edits.capacity());
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/UndoManagerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/UndoManagerTest.java?rev=567562&r1=567561&r2=567562&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/UndoManagerTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/undo/UndoManagerTest.java
Mon Aug 20 00:02:02 2007
@@ -20,8 +20,6 @@
  */
 package javax.swing.undo;
 
-import java.util.Hashtable;
-
 import javax.swing.UIManager;
 import javax.swing.event.UndoableEditEvent;
 
@@ -743,5 +741,10 @@
         // must be called:
         // 1) edit3.die
         // 2) edit2.die
+    }
+
+    @Override
+    public void testEditsCapacity() { // Regression for HARMONY-2649
+        assertEquals(100, um.edits.capacity());
     }
 }



Mime
View raw message