harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r410019 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/PropertyEditorSupport.java test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
Date Mon, 29 May 2006 04:29:12 GMT
Author: mloenko
Date: Sun May 28 21:29:11 2006
New Revision: 410019

URL: http://svn.apache.org/viewvc?rev=410019&view=rev
Log:
HARMONY-516 patch applied ( [classlib] [beans] java.beans.PropertyEditorSupport.getAsText()
throws unexpected ClassCastException)
more PropertyEditorSupportTest failures fixed

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java?rev=410019&r1=410018&r2=410019&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java
Sun May 28 21:29:11 2006
@@ -42,6 +42,9 @@
      * @com.intel.drl.spec_ref
      */
     protected PropertyEditorSupport(Object source) {
+        if( source == null ) {
+            throw new NullPointerException("source is null");
+        }
         this.source = source;
     }
 
@@ -75,14 +78,14 @@
      * @com.intel.drl.spec_ref
      */
     public String getJavaInitializationString() {
-        return "<Unknown>";
+        return "???";
     }
 
     /**
      * @com.intel.drl.spec_ref
      */
     public String getAsText() {
-        return (String) newValue;
+        return newValue == null ? "null" : (String) newValue;
     }
 
     /**
@@ -116,9 +119,7 @@
      */
     public synchronized void addPropertyChangeListener(
             PropertyChangeListener listener) {
-        if (listener != null) {
-            listeners.add(listener);
-        }
+        listeners.add(listener);
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java?rev=410019&r1=410018&r2=410019&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorSupportTest.java
Sun May 28 21:29:11 2006
@@ -31,6 +31,7 @@
 	 * Class under test for void PropertyEditorSupport()
 	 */
 	public void testPropertyEditorSupport() {
+        // Regression for HARMONY-516
 		MockPropertyEditorSupport support = new MockPropertyEditorSupport();
 
 		assertEquals("null", support.getAsText());



Mime
View raw message