harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r414623 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/io/ObjectStreamField.java test/java/tests/api/java/io/ObjectStreamFieldTest.java
Date Thu, 15 Jun 2006 15:50:46 GMT
Author: tellison
Date: Thu Jun 15 08:50:45 2006
New Revision: 414623

URL: http://svn.apache.org/viewvc?rev=414623&view=rev
Log:
Type strings for primitive object stream fields should be null.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamField.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/ObjectStreamFieldTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamField.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamField.java?rev=414623&r1=414622&r2=414623&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamField.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectStreamField.java
Thu Jun 15 08:50:45 2006
@@ -189,8 +189,12 @@
 	 * @return A String, the signature for the class of this field.
 	 */
 	public String getTypeString() {
-		if (typeString == null)
+		if (isPrimitive()) {
+			return null;
+		}
+		if (typeString == null) {
 			typeString = computeTypeString().intern();
+		}
 		return typeString;
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/ObjectStreamFieldTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/ObjectStreamFieldTest.java?rev=414623&r1=414622&r2=414623&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/ObjectStreamFieldTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/ObjectStreamFieldTest.java
Thu Jun 15 08:50:45 2006
@@ -121,10 +121,9 @@
 	 * @tests java.io.ObjectStreamField#getTypeString()
 	 */
 	public void test_getTypeString() {
-		// Test for method java.lang.String
-		// java.io.ObjectStreamField.getTypeString()
 		assertTrue("getTypeString returned: " + holaField.getTypeString(),
 				holaField.getTypeString().indexOf("Object") >= 0);
+		assertNull("Primitive types' strings should be null", hamField.getTypeString());
 	}
 
 	/**



Mime
View raw message