harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r490975 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/net/URI.java test/java/tests/api/java/net/URITest.java
Date Fri, 29 Dec 2006 10:28:08 GMT
Author: tellison
Date: Fri Dec 29 02:28:07 2006
New Revision: 490975

URL: http://svn.apache.org/viewvc?view=rev&rev=490975
Log:
Apply patch HARMONY-1693 ([classlib][net] compatibility: URI(4* null).getPath() returns null
on Harmony and empty string on RI)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URITest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java?view=diff&rev=490975&r1=490974&r2=490975
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java Fri Dec 29
02:28:07 2006
@@ -104,6 +104,7 @@
 
         if (scheme == null && userinfo == null && host == null &&
path == null
                 && query == null && fragment == null) {
+            this.path = ""; //$NON-NLS-1$
             return;
         }
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URITest.java?view=diff&rev=490975&r1=490974&r2=490975
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URITest.java
Fri Dec 29 02:28:07 2006
@@ -411,6 +411,9 @@
 			// equivalent to = uri = new URI("http", "host", "/apath", "\u0080frag");
 			uri = new URI("http", "host", "/apath", "\u20ACfrag"); 
 
+                  // Regression test for Harmony-1693
+                  new URI(null, null, null, null);
+
 		} catch (URISyntaxException e) {
 			fail("Unexpected URISyntaxException:" + e);
 		}
@@ -1768,11 +1771,5 @@
 				fail("Expected IllegalArgumentException not thrown");
 			} catch (IllegalArgumentException e) {
 			}
-	}
-
-	protected void setUp() {
-	}
-
-	protected void tearDown() {
 	}
 }



Mime
View raw message