harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lian...@apache.org
Subject svn commit: r489055 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/io/File.java test/java/tests/api/java/io/FileTest.java
Date Wed, 20 Dec 2006 11:30:42 GMT
Author: liangyx
Date: Wed Dec 20 03:30:41 2006
New Revision: 489055

URL: http://svn.apache.org/viewvc?view=rev&rev=489055
Log:
Apply patch for HARMONY-2674 ([classlib][luni]File on Harmony has more fields than serialization
form requires .)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/File.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/File.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/File.java?view=diff&rev=489055&r1=489054&r2=489055
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/File.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/File.java Wed Dec 20
03:30:41 2006
@@ -50,7 +50,7 @@
 
 	private String path;
 
-	byte[] properPath;
+	transient byte[] properPath;
 
 	/**
 	 * System dependent file separator character.

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java?view=diff&rev=489055&r1=489054&r2=489055
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
Wed Dec 20 03:30:41 2006
@@ -23,6 +23,8 @@
 import java.io.FileOutputStream;
 import java.io.FilenameFilter;
 import java.io.IOException;
+import java.io.ObjectStreamClass;
+import java.io.ObjectStreamField;
 import java.io.RandomAccessFile;
 import java.net.MalformedURLException;
 import java.net.URI;
@@ -2188,6 +2190,20 @@
                 new String[] {}, false);
         assertFalse(dir.exists());
         assertFalse(subDir.exists());
+    }
+    
+    /**
+     * @tests serilization
+     */
+    public void test_objectStreamClass_getFields() throws Exception {
+        //Regression for HARMONY-2674
+        ObjectStreamClass objectStreamClass = ObjectStreamClass
+                .lookup(File.class);
+        ObjectStreamField[] objectStreamFields = objectStreamClass.getFields();
+        assertEquals(1, objectStreamFields.length);
+        ObjectStreamField objectStreamField = objectStreamFields[0];
+        assertEquals("path", objectStreamField.getName());
+        assertEquals(String.class, objectStreamField.getType());
     }
     
 	/**



Mime
View raw message