Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointer if URI begins "jar:file:/" in URIUtils #51

Open
liuyx11241 opened this issue Feb 26, 2019 · 2 comments
Open

NullPointer if URI begins "jar:file:/" in URIUtils #51

liuyx11241 opened this issue Feb 26, 2019 · 2 comments

Comments

@liuyx11241
Copy link

URIUtils propose a SCHEMAURI_CHECKER.
But if the URI begins with "jar:file:", the argument.getPath() will return a null value then we will get a null pointer exception.

    private static final ArgumentChecker<URI> SCHEMAURI_CHECKER
        = new ArgumentChecker<URI>()
    {
        @Override
        public void check(final URI argument)
        {
            BUNDLE.checkArgumentPrintf(argument.isAbsolute(),
                "uriChecks.notAbsolute", argument);
            final JsonRef ref = JsonRef.fromURI(argument);
            BUNDLE.checkArgumentPrintf(ref.isAbsolute(),
                "uriChecks.notAbsoluteRef", argument);
            BUNDLE.checkArgumentPrintf(!argument.getPath().endsWith("/"),
                "uriChecks.endingSlash", argument);
        }
    };
@smileatom
Copy link

Will this be released soon, I need this.....

@baurceanu
Copy link

Released in 1.2.14. Should be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants