[jboss-cvs] Repository SVN: r2143 - in oswego-concurrent/1.3.4-jboss-update1: lib and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 12 15:30:52 EST 2007
Author: jhowell at redhat.com
Date: 2007-12-12 15:30:52 -0500 (Wed, 12 Dec 2007)
New Revision: 2143
Added:
oswego-concurrent/1.3.4-jboss-update1/component-info.xml
oswego-concurrent/1.3.4-jboss-update1/lib/
oswego-concurrent/1.3.4-jboss-update1/lib/concurrent-src.zip
oswego-concurrent/1.3.4-jboss-update1/lib/concurrent.jar
oswego-concurrent/1.3.4-jboss-update1/src/
oswego-concurrent/1.3.4-jboss-update1/src/ConcurrentHashMap.patch
oswego-concurrent/1.3.4-jboss-update1/src/PooledExecutor.patch
oswego-concurrent/1.3.4-jboss-update1/src/README.txt
oswego-concurrent/1.3.4-jboss-update1/src/concurrent-build.patch
oswego-concurrent/1.3.4-jboss-update1/src/concurrent.zip
Log:
[JBAS-5072] The previous fix 4698, fixed the problem by using iteration instead of values(), but it also allowed nulls to be put into the array, which throws a null pointer exception. I would have used the same defect number, but I missed the window for the versions that 4698 fixed, so I opened a new defect.
Added: oswego-concurrent/1.3.4-jboss-update1/component-info.xml
===================================================================
--- oswego-concurrent/1.3.4-jboss-update1/component-info.xml (rev 0)
+++ oswego-concurrent/1.3.4-jboss-update1/component-info.xml 2007-12-12 20:30:52 UTC (rev 2143)
@@ -0,0 +1,16 @@
+<project name="oswego-concurrent-component-info">
+ <!-- ============================================================ -->
+ <!-- Oswego Concurrent Library -->
+ <!-- ============================================================ -->
+ <component id="oswego-concurrent"
+ licenseType="oswego"
+ version="1.3.4-jboss-update1"
+ projectHome="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"
+ description="Oswego util.concurrent package">
+ <artifact id="concurrent.jar"/>
+ <artifact id="concurrent-src.zip"/>
+ <export>
+ <include input="concurrent.jar"/>
+ </export>
+ </component>
+</project>
Added: oswego-concurrent/1.3.4-jboss-update1/lib/concurrent-src.zip
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4-jboss-update1/lib/concurrent-src.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: oswego-concurrent/1.3.4-jboss-update1/lib/concurrent.jar
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4-jboss-update1/lib/concurrent.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: oswego-concurrent/1.3.4-jboss-update1/src/ConcurrentHashMap.patch
===================================================================
--- oswego-concurrent/1.3.4-jboss-update1/src/ConcurrentHashMap.patch (rev 0)
+++ oswego-concurrent/1.3.4-jboss-update1/src/ConcurrentHashMap.patch 2007-12-12 20:30:52 UTC (rev 2143)
@@ -0,0 +1,119 @@
+Index: /root/jboss/4.0.5GA/oswegolocalrepos/src/EDU/oswego/cs/dl/util/concurrent/ConcurrentHashMap.java
+===================================================================
+--- /root/jboss/4.0.5GA/oswegolocalrepos/src/EDU/oswego/cs/dl/util/concurrent/ConcurrentHashMap.java (revision 4)
++++ /root/jboss/4.0.5GA/oswegolocalrepos/src/EDU/oswego/cs/dl/util/concurrent/ConcurrentHashMap.java (working copy)
+@@ -21,6 +21,7 @@
+ 12jan2001 dl public release
+ 17nov2001 dl Minor tunings
+ 24oct2003 dl Segment implements Serializable
++ 23jun2004 dl Avoid bad array sizings in view toArray methods
+ */
+
+ package EDU.oswego.cs.dl.util.concurrent;
+@@ -31,6 +32,7 @@
+ import java.util.AbstractCollection;
+ import java.util.Collection;
+ import java.util.Set;
++import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.Enumeration;
+ import java.util.NoSuchElementException;
+@@ -879,6 +881,32 @@
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
+@@ -911,6 +939,32 @@
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
+@@ -954,6 +1008,32 @@
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ Object o=null;
++ for (Iterator i = iterator(); i.hasNext(); )
++ {
++ o = i.next();
++ if(o!=null)
++ {
++ c.add(o);
++ }
++ }
++ return c.toArray(a);
++ }
+ }
+
+ /**
Added: oswego-concurrent/1.3.4-jboss-update1/src/PooledExecutor.patch
===================================================================
--- oswego-concurrent/1.3.4-jboss-update1/src/PooledExecutor.patch (rev 0)
+++ oswego-concurrent/1.3.4-jboss-update1/src/PooledExecutor.patch 2007-12-12 20:30:52 UTC (rev 2143)
@@ -0,0 +1,47 @@
+--- src/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.java 2007-09-11 14:32:37.000000000 +0200
++++ /home/ejort/temp/PooledExecutor.java 2005-07-15 20:47:08.000000000 +0200
+@@ -27,10 +27,11 @@
+ Simplify locking scheme
+ 25jan2001 dl {get,set}BlockedExecutionHandler now public
+ 17may2002 dl null out task var in worker run to enable GC.
+ 30aug2003 dl check for new tasks when timing out
+ 18feb2004 dl replace dead thread if no others left
++ 23jun2004 dl fix shutdownAfterProcessingCurrentlyQueuedTasks
+ */
+
+ package EDU.oswego.cs.dl.util.concurrent;
+ import java.util.*;
+
+@@ -589,15 +590,27 @@
+ * Terminate threads after processing all elements currently in
+ * queue. Any tasks entered after this point will be handled by the
+ * given BlockedExecutionHandler. A shut down pool cannot be
+ * restarted.
+ **/
+- public synchronized void shutdownAfterProcessingCurrentlyQueuedTasks(BlockedExecutionHandler handler) {
+- setBlockedExecutionHandler(handler);
+- shutdown_ = true;
+- if (poolSize_ == 0) // disable new thread construction when idle
+- minimumPoolSize_ = maximumPoolSize_ = 0;
++ public void shutdownAfterProcessingCurrentlyQueuedTasks(BlockedExecutionHandler handler) {
++ synchronized(this) {
++ setBlockedExecutionHandler(handler);
++ shutdown_ = true;
++ if (poolSize_ == 0) // disable new thread construction when idle
++ minimumPoolSize_ = maximumPoolSize_ = 0;
++ }
++ // Try to add a final task to interrupt remaining threads waiting
++ // on handoff that will never otherwise get new tasks. If the
++ // offer fails, no threads such could be waiting
++ try {
++ Runnable r = new Runnable() { public void run() { interruptAll(); }};
++ handOff_.offer(r, 0);
++ }
++ catch(InterruptedException ie) {
++ Thread.currentThread().interrupt();
++ }
+ }
+
+ /**
+ * Return true if a shutDown method has succeeded in terminating all
+ * threads.
Added: oswego-concurrent/1.3.4-jboss-update1/src/README.txt
===================================================================
--- oswego-concurrent/1.3.4-jboss-update1/src/README.txt (rev 0)
+++ oswego-concurrent/1.3.4-jboss-update1/src/README.txt 2007-12-12 20:30:52 UTC (rev 2143)
@@ -0,0 +1,9 @@
+This is the latest version of oswego concurrent
+compiled with jdk1.4
+
+The concurrent.zip contains the 1.3.4 source.
+
+The patches enable debug for the generated code
+and apply the unreleased fixes to
+ConcurrentHashMap and PooledExecutor mentioned here:
+http://g.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
Added: oswego-concurrent/1.3.4-jboss-update1/src/concurrent-build.patch
===================================================================
--- oswego-concurrent/1.3.4-jboss-update1/src/concurrent-build.patch (rev 0)
+++ oswego-concurrent/1.3.4-jboss-update1/src/concurrent-build.patch 2007-12-12 20:30:52 UTC (rev 2143)
@@ -0,0 +1,19 @@
+*** build.xml.orig 2007-03-23 13:38:19.000000000 -0400
+--- build.xml 2007-03-23 13:39:30.000000000 -0400
+***************
+*** 42,48 ****
+ </target>
+
+ <target name="compile" depends="setup.packages">
+! <javac srcdir="src" destdir="build" optimize="true"/>
+ </target>
+
+ <target name="dist" depends="compile">
+--- 42,48 ----
+ </target>
+
+ <target name="compile" depends="setup.packages">
+! <javac srcdir="src" destdir="build" debug="on" optimize="true"/>
+ </target>
+
+ <target name="dist" depends="compile">
Added: oswego-concurrent/1.3.4-jboss-update1/src/concurrent.zip
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4-jboss-update1/src/concurrent.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the jboss-cvs-commits
mailing list