harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r410190 - 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 Tue, 30 May 2006 05:20:12 GMT
Author: mloenko
Date: Mon May 29 22:20:12 2006
New Revision: 410190

URL: http://svn.apache.org/viewvc?rev=410190&view=rev
Log:
HARMONY-516 refixed
([classlib] [beans] java.beans.PropertyEditorSupport.getAsText() throws unexpected ClassCastException)

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=410190&r1=410189&r2=410190&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
Mon May 29 22:20:12 2006
@@ -85,7 +85,7 @@
      * @com.intel.drl.spec_ref
      */
     public String getAsText() {
-        return newValue == null ? "null" : (String) newValue;
+        return newValue == null ? "null" : newValue.toString();
     }
 
     /**

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=410190&r1=410189&r2=410190&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
Mon May 29 22:20:12 2006
@@ -41,11 +41,15 @@
 		assertNull(support.getTags());
 		assertFalse(support.supportsCustomEditor());
 		assertFalse(support.isPaintable());
-	}
+
+        Object value = new String[] { "java.awt.Color.orange" };
+        support.setValue(value);
+        assertEquals(value.toString(), support.getAsText());
+    }
 
 	/*
-	 * Class under test for void PropertyEditorSupport(Object)
-	 */
+     * Class under test for void PropertyEditorSupport(Object)
+     */
 	public void testPropertyEditorSupportObject() {
 		MockSource source = new MockSource();
 		MockPropertyEditorSupport support = new MockPropertyEditorSupport(
@@ -58,11 +62,11 @@
 		assertNull(support.getTags());
 		assertFalse(support.supportsCustomEditor());
 		assertFalse(support.isPaintable());
-	}
+    }
 
 	/*
-	 * source null
-	 */
+     * source null
+     */
 	public void testPropertyEditorSupportObject_null() {
 		try {
 			MockPropertyEditorSupport support = new MockPropertyEditorSupport(



Mime
View raw message