harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r489326 - in /harmony/enhanced/classlib/trunk/modules/awt: make/ src/main/java/common/java/awt/ src/test/api/java/common/java/awt/
Date Thu, 21 Dec 2006 11:25:14 GMT
Author: apetrenko
Date: Thu Dec 21 03:25:10 2006
New Revision: 489326

URL: http://svn.apache.org/viewvc?view=rev&rev=489326
Log:
Patch for HARMONY-1667 "[classlib][awt] RI BorderLayout.addLayoutComponent(Component, null)
throws NPE while Harmony doesn't"

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.drl
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.ibm
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.drl
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.ibm
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.drl
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.ibm
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.drl
    harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.ibm
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.drl?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.drl (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.drl Thu Dec 21 03:25:10
2006
@@ -16,7 +16,6 @@
 java/awt/WindowTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.ibm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.ibm?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.ibm (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86.ibm Thu Dec 21 03:25:10
2006
@@ -16,7 +16,6 @@
 java/awt/WindowTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.drl?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.drl (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.drl Thu Dec 21 03:25:10
2006
@@ -16,7 +16,6 @@
 java/awt/WindowTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.ibm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.ibm?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.ibm (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.linux.x86_64.ibm Thu Dec 21 03:25:10
2006
@@ -16,7 +16,6 @@
 java/awt/WindowTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.drl?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.drl (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.drl Thu Dec 21 03:25:10
2006
@@ -15,7 +15,6 @@
 java/awt/RobotTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.ibm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.ibm?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.ibm (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86.ibm Thu Dec 21 03:25:10
2006
@@ -21,7 +21,6 @@
 java/awt/RobotTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.drl?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.drl (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.drl Thu Dec 21
03:25:10 2006
@@ -15,7 +15,6 @@
 java/awt/RobotTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.ibm
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.ibm?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.ibm (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/exclude.windows.x86_64.ibm Thu Dec 21
03:25:10 2006
@@ -15,7 +15,6 @@
 java/awt/RobotTest.java
 java/awt/WindowRTest.java
 java/awt/datatransfer/ClipboardTest.java
-java/awt/BorderLayoutTest.java
 java/awt/ButtonRTest.java
 java/awt/CardLayoutTest.java
 java/awt/ChoiceTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/BorderLayout.java
Thu Dec 21 03:25:10 2006
@@ -172,6 +172,9 @@
     public void addLayoutComponent(Component comp, Object constraints) {
         toolkit.lockAWT();
         try {
+            if (comp == null) {
+                throw new NullPointerException("Component is null");
+            }
             if ((constraints == null) || (constraints instanceof String)) {
                 addLayoutComponent((String) constraints, comp);
             } else {

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java?view=diff&rev=489326&r1=489325&r2=489326
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java
Thu Dec 21 03:25:10 2006
@@ -119,6 +119,14 @@
         assertTrue(notString);
         assertTrue(wrongString);
         assertFalse(oneTwice);
+        
+        // Regression test HARMONY-1667
+        try {
+            layout.addLayoutComponent(null, BorderLayout.CENTER);
+            fail("Expected NPE");
+        } catch (NullPointerException e) {
+            // expected
+        }
     }
 
     public final void testRemoveLayoutComponent() {



Mime
View raw message