harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r518997 - in /harmony/enhanced/classlib/trunk/modules/awt/src: main/java/common/java/awt/Window.java test/api/java/common/java/awt/FrameRTest.java
Date Fri, 16 Mar 2007 15:05:56 GMT
Author: ayza
Date: Fri Mar 16 08:05:55 2007
New Revision: 518997

URL: http://svn.apache.org/viewvc?view=rev&rev=518997
Log:
Applying patch from HARMONY-3318 ([classlib][awt] java.awt.Frame.setTitle(String) does not
treat null as empty string)

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Window.java
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FrameRTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Window.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Window.java?view=diff&rev=518997&r1=518996&r2=518997
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Window.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Window.java
Fri Mar 16 08:05:55 2007
@@ -975,7 +975,7 @@
         String oldTitle = this.title;
         toolkit.lockAWT();
         try {
-            this.title = title;
+            this.title = (title == null) ? "" : title; //$NON-NLS-1$
             NativeWindow win = getNativeWindow();
             if (win != null) {
                 win.setTitle(title);

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FrameRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FrameRTest.java?view=diff&rev=518997&r1=518996&r2=518997
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FrameRTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FrameRTest.java
Fri Mar 16 08:05:55 2007
@@ -30,4 +30,12 @@
     public void testConstructor() {
         new Frame();
     }
+
+    // regression test for HARMONY-3318
+    public void testSetTitle() {
+        final Frame frame = new Frame();
+        
+        frame.setTitle(null);
+        assertEquals("", frame.getTitle());  //$NON-NLS-1$
+    }
 }



Mime
View raw message