Skip to content

Schema redirect - opaque URI strange check - URIUtils #48

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

Closed
regfaker opened this issue Nov 14, 2018 · 0 comments · Fixed by #88
Closed

Schema redirect - opaque URI strange check - URIUtils #48

regfaker opened this issue Nov 14, 2018 · 0 comments · Fixed by #88

Comments

@regfaker
Copy link

URIUtils schema URI checker used for URITranslatorConfigurationBuilder.addSchemaRedirect() checks path of URI not ending with slash.

BUNDLE.checkArgumentPrintf(!argument.getPath().endsWith("/"),

This is problem for opaque URI (e.g. URN) where there is no path and such call throws NullPointerException.
This path check seems unnecessary as normalization use only scheme, scheme specific part and fragment of URI (not path).
return new URI(uri.getScheme(), uri.getSchemeSpecificPart(),

Please verify check and normalization correlation. Or maybe just NPE aid will do the thing.
Thanks

@regfaker regfaker changed the title Schema redirect - opaque URI strange validation - URIUtils Schema redirect - opaque URI strange check - URIUtils Nov 14, 2018
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

Successfully merging a pull request may close this issue.

1 participant