public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: fix ConcurrentModificationException should be thrown when altering  the capacity of the array.
@ 2009-07-03 13:55 Mario Torre
  0 siblings, 0 replies; 2+ messages in thread
From: Mario Torre @ 2009-07-03 13:55 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

I'm committing this change to fix the issue in subject.

Cheers,
Mario

2009-07-03  Mario Torre  <neugens@aicas.com>

      * gnu/testlet/java/util/ArrayList/AcuniaArrayListTest:
        fix ConcurrentModificationException should be thrown when
        altering the capacity of the array.
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-44
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://endsoftpatents.org/



[-- Attachment #2: 2009-07-03-AcuniaArrayListTest.patch --]
[-- Type: text/x-patch, Size: 2585 bytes --]

# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: mauve/gnu/testlet/java/util/ArrayList/AcuniaArrayListTest.java
--- mauve/gnu/testlet/java/util/ArrayList/AcuniaArrayListTest.java Base (1.4)
+++ mauve/gnu/testlet/java/util/ArrayList/AcuniaArrayListTest.java Locally Modified (Based On 1.4)
@@ -580,9 +580,21 @@
     catch(ConcurrentModificationException ioobe) { th.check(true); }
     ArrayList al = buildAL();
     it = al.iterator();
-    al.get(0);
     al.trimToSize();
+    try {
+    	it.next();
+        th.fail("should throw a ConcurrentModificationException -- 3");
+    } catch(ConcurrentModificationException ioobe) { th.check(true); }
+
+    it = al.iterator();
     al.ensureCapacity(25);
+    try {
+    	it.next();
+        th.fail("should throw a ConcurrentModificationException -- 3");
+    } catch(ConcurrentModificationException ioobe) { th.check(true); }
+
+    it = al.iterator();
+    al.get(0);
     al.contains(null);
     al.isEmpty();
     al.indexOf(null);
@@ -596,6 +608,7 @@
     	th.check(true);
         }
     catch(ConcurrentModificationException ioobe) { th.fail("should not throw a ConcurrentModificationException -- 2"); }
+
     it = al.iterator();
     al.add("b");
     try {
@@ -603,6 +616,7 @@
         th.fail("should throw a ConcurrentModificationException -- 3");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.add(3,"b");
     try {
@@ -610,6 +624,7 @@
         th.fail("should throw a ConcurrentModificationException -- 4");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.addAll(xal);
     try {
@@ -617,6 +632,7 @@
         th.fail("should throw a ConcurrentModificationException -- 5");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.addAll(2,xal);
     try {
@@ -624,6 +640,7 @@
         th.fail("should throw a ConcurrentModificationException -- 6");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.remove(2);
     try {
@@ -631,6 +648,7 @@
         th.fail("should throw a ConcurrentModificationException -- 8");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.clear();
     try {


^ permalink raw reply	[flat|nested] 2+ messages in thread

* FYI: fix ConcurrentModificationException should be thrown when altering  the capacity of the array.
@ 2009-07-03 13:54 Mario Torre
  0 siblings, 0 replies; 2+ messages in thread
From: Mario Torre @ 2009-07-03 13:54 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

I'm committing this change to fix the issue in subject.

Cheers,
Mario

2009-07-03  Mario Torre  <neugens@aicas.com>

     * gnu/testlet/java/util/ArrayList/AcuniaArrayListTest:
       fix ConcurrentModificationException should be thrown when
       altering the capacity of the array.
-- 
Mario Torre, Software Developer, http://www.jroller.com/neugens/
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-44
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt

Please, support open standards:
http://endsoftpatents.org/


[-- Attachment #2: 2009-07-03-AcuniaArrayListTest.patch --]
[-- Type: text/x-patch, Size: 2584 bytes --]

# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: mauve/gnu/testlet/java/util/ArrayList/AcuniaArrayListTest.java
--- mauve/gnu/testlet/java/util/ArrayList/AcuniaArrayListTest.java Base (1.4)
+++ mauve/gnu/testlet/java/util/ArrayList/AcuniaArrayListTest.java Locally Modified (Based On 1.4)
@@ -580,9 +580,21 @@
     catch(ConcurrentModificationException ioobe) { th.check(true); }
     ArrayList al = buildAL();
     it = al.iterator();
-    al.get(0);
     al.trimToSize();
+    try {
+    	it.next();
+        th.fail("should throw a ConcurrentModificationException -- 3");
+    } catch(ConcurrentModificationException ioobe) { th.check(true); }
+
+    it = al.iterator();
     al.ensureCapacity(25);
+    try {
+    	it.next();
+        th.fail("should throw a ConcurrentModificationException -- 3");
+    } catch(ConcurrentModificationException ioobe) { th.check(true); }
+
+    it = al.iterator();
+    al.get(0);
     al.contains(null);
     al.isEmpty();
     al.indexOf(null);
@@ -596,6 +608,7 @@
     	th.check(true);
         }
     catch(ConcurrentModificationException ioobe) { th.fail("should not throw a ConcurrentModificationException -- 2"); }
+
     it = al.iterator();
     al.add("b");
     try {
@@ -603,6 +616,7 @@
         th.fail("should throw a ConcurrentModificationException -- 3");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.add(3,"b");
     try {
@@ -610,6 +624,7 @@
         th.fail("should throw a ConcurrentModificationException -- 4");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.addAll(xal);
     try {
@@ -617,6 +632,7 @@
         th.fail("should throw a ConcurrentModificationException -- 5");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.addAll(2,xal);
     try {
@@ -624,6 +640,7 @@
         th.fail("should throw a ConcurrentModificationException -- 6");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.remove(2);
     try {
@@ -631,6 +648,7 @@
         th.fail("should throw a ConcurrentModificationException -- 8");
         }
     catch(ConcurrentModificationException ioobe) { th.check(true); }
+
     it = al.iterator();
     al.clear();
     try {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-03 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-03 13:55 FYI: fix ConcurrentModificationException should be thrown when altering the capacity of the array Mario Torre
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03 13:54 Mario Torre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).