harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r467350 - in /incubator/harmony/enhanced/drlvm/trunk/vm: tests/kernel/java/lang/ThreadGroupTest.java vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
Date Tue, 24 Oct 2006 14:55:53 GMT
Author: geirm
Date: Tue Oct 24 07:55:52 2006
New Revision: 467350

URL: http://svn.apache.org/viewvc?view=rev&rev=467350
Log:
HARMONY-1625

Accepted the patch to modify DRLVM to support the setMaxPriority() bug
in the RI and J9, and also the fix for the test

I'm asking the submitters to please create a new JIRA with the patch to the
classlib ThreadGroup test and specify what is wrong, and what it fixed

Ubuntu 6 - c-unit, smoke, ~kernel


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

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadGroupTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadGroupTest.java?view=diff&rev=467350&r1=467349&r2=467350
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadGroupTest.java
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/tests/kernel/java/lang/ThreadGroupTest.java
Tue Oct 24 07:55:52 2006
@@ -971,8 +971,8 @@
                      curPriority, tg.getMaxPriority());
         newPriority = Thread.MIN_PRIORITY - 1;
         tg.setMaxPriority(newPriority);
-        assertEquals("Assert2: group priority should not change",
-                     curPriority, tg.getMaxPriority());
+        assertEquals("Assert2: group priority should be set to Thread.MIN_PRIORITY",
+        		Thread.MIN_PRIORITY, tg.getMaxPriority());
     }
 
     /**

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java?view=diff&rev=467350&r1=467349&r2=467350
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadGroup.java
Tue Oct 24 07:55:52 2006
@@ -314,7 +314,17 @@
      */
     public synchronized final void setMaxPriority(int priority) {
         checkAccess();
-        if (priority > Thread.MAX_PRIORITY || priority < Thread.MIN_PRIORITY) {
+        
+        /*
+         *  GMJ : note that this is to match a known bug in the RI
+         *  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4708197
+         *  We agreed to follow bug for now to prevent breaking apps
+         */
+        if (priority > Thread.MAX_PRIORITY) {
+            return;
+        }
+        if (priority < Thread.MIN_PRIORITY) {
+            this.maxPriority = Thread.MIN_PRIORITY;
             return;
         }
         this.maxPriority = (parent != null && parent.maxPriority < priority)



Mime
View raw message