jdk/test/demo/zipfs/Basic.java
changeset 7531 77870839c857
parent 6699 d8229570529d
child 8165 b67d8b1f4e46
--- a/jdk/test/demo/zipfs/Basic.java	Mon Dec 06 18:52:23 2010 +0000
+++ b/jdk/test/demo/zipfs/Basic.java	Mon Dec 06 13:18:16 2010 -0800
@@ -40,24 +40,24 @@
         boolean found = false;
 
         for (FileSystemProvider provider: FileSystemProvider.installedProviders()) {
-            if (provider.getScheme().equalsIgnoreCase("zip")) {
+            if (provider.getScheme().equalsIgnoreCase("jar")) {
                 found = true;
                 break;
             }
         }
         if (!found)
-            throw new RuntimeException("'zip' provider not installed");
+            throw new RuntimeException("'jar' provider not installed");
 
         // Test: FileSystems#newFileSystem(FileRef)
         Map<String,?> env = new HashMap<String,Object>();
         FileSystems.newFileSystem(zipfile, env, null).close();
 
         // Test: FileSystems#newFileSystem(URI)
-        URI uri = URI.create("zip" + zipfile.toUri().toString().substring(4));
+        URI uri = new URI("jar", zipfile.toUri().toString(), null);
         FileSystem fs = FileSystems.newFileSystem(uri, env, null);
 
         // Test: exercise toUri method
-        String expected = uri.toString() + "#/foo";
+        String expected = uri.toString() + "!/foo";
         String actual = fs.getPath("/foo").toUri().toString();
         if (!actual.equals(expected)) {
             throw new RuntimeException("toUri returned '" + actual +