hg: nio/nio/jdk: 2 new changesets
alan.bateman at sun.com
alan.bateman at sun.com
Thu Dec 3 11:44:23 PST 2009
Changeset: a2cbf3efeaa1
Author: alanb
Date: 2009-12-03 19:36 +0000
URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/a2cbf3efeaa1
More fixes to zip provider
* s/pathForprint/pathForPrint/g
* Fixed comment typos.
* Use String ctor directly, instead of substring(), no need to keep larger
array around.
* Replaced StringBuffer with StringBuilder.
* ZipFilePath.normalize() now works.
* ZipPathParser.normalize() now chops trailing slashes.
* ZipPathParser.resolve() now handles leading '..' in relative paths properly.
* Introduced checkPath() to throw NPE and ProviderMismatchExceptions before
using Paths passed as arguments.
* Fixed endsWith() to handle absolute other path properly (/foo !endsWith /).
* Fixed startsWith(): Absolute paths do not start with relative ones.
* Simplified subpath(). (This was overcomplex.)
* normalize() now returns null for paths equivalent to "."
* Cannot relativize() when exactly one path is absolute.
* getParent() returned null instead of "/" for single-element absolute paths
("/foo").
Contributed-by: uckelman at nomic.net
! src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipFilePath.java
! src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipPathParser.java
Changeset: fa2afb1da3a0
Author: alanb
Date: 2009-12-03 19:44 +0000
URL: http://hg.openjdk.java.net/nio/nio/jdk/rev/fa2afb1da3a0
Added unit test for zip provider path operations
Fixed regression so that isDirectory returns true for directories
! src/share/demo/nio/ZipFileSystem/com/sun/nio/zipfs/ZipUtils.java
+ test/demo/nio/ZipFileSystem/Basic.java
+ test/demo/nio/ZipFileSystem/PathOps.java
- test/demo/nio/ZipFileSystem/Sanity.java
+ test/demo/nio/ZipFileSystem/basic.sh
- test/demo/nio/ZipFileSystem/sanity.sh
More information about the nio-dev
mailing list