harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r616296 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
Date Tue, 29 Jan 2008 13:09:46 GMT
Author: gshimansky
Date: Tue Jan 29 05:09:44 2008
New Revision: 616296

URL: http://svn.apache.org/viewvc?rev=616296&view=rev
Log:
Applied patch from HARMONY-4332
[drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException
if array.length = 0


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java?rev=616296&r1=616295&r2=616296&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
Tue Jan 29 05:09:44 2008
@@ -491,6 +491,9 @@
      *         done
      */
     private int enumerate(Thread[] list, int offset, boolean recurse) {
+        if (list.length == 0) {
+            return 0;
+        }
         List groupsCopy = null;  // a copy of subgroups list
         List threadsCopy = null; // a copy of threads list
         synchronized (lock) {



Mime
View raw message