-
Bug
-
Resolution: Unresolved
-
P4
-
17, 20, 21
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The javadoc for java.nio.file.Path.compareTo says that "if the paths are associated with different providers", the method throws a ClassCastException, but jdk.nio.zipfs.ZipPath.compareTo throws ProviderMismatchException instead.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a FileSystem for a zip/jar file via FileSystems.newFileSystem
2. Get a path, any path, from the zip fs
3. Get a path, any path, from the default FileSystem
4. Call compareTo on the Path from the zip fs with the Path from the default fs as argument
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Comparison throws a ClassCastException
ACTUAL -
Comparison throws a ProviderMismatchException
FREQUENCY : always
The javadoc for java.nio.file.Path.compareTo says that "if the paths are associated with different providers", the method throws a ClassCastException, but jdk.nio.zipfs.ZipPath.compareTo throws ProviderMismatchException instead.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a FileSystem for a zip/jar file via FileSystems.newFileSystem
2. Get a path, any path, from the zip fs
3. Get a path, any path, from the default FileSystem
4. Call compareTo on the Path from the zip fs with the Path from the default fs as argument
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Comparison throws a ClassCastException
ACTUAL -
Comparison throws a ProviderMismatchException
FREQUENCY : always