Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.
This repository was archived by the owner on May 28, 2018. It is now read-only.

JarFileScanner ignores recursive flag on Windows #2893

@glassfishrobot

Description

@glassfishrobot

The JarFileScanner erroneously uses the File.separatorChar character to determine whether a particular JarEntry in a .jar file is part of the parent package:

**JarFileScanner.java,hasNext():97**// accept only entries directly in the folder. String suffix = next.getName().substring(parent.length());
if (suffix.lastIndexOf(File.separatorChar) <= 0) {
    break;
}

On *NIX machines this works fine, because the JarEntry separator character matches the File.separatorChar. On Windows systems, this isn't the case and the code functions as if the recursive flag is always set to true.

Environment

Windows

Affected Versions

[2.10.1]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions