-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
HttpUtil: fix invalid URI #4546
Conversation
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
@mherwege not a review yet, just a remark: Can url be null? Then method |
Signed-off-by: Mark Herwege <[email protected]>
I don't think that is entirely what the documentation says. It says to replace it with
As this is called from static public functions and never checked, I guess it could be. There are also no Null annotations. I will put in some checks for this.
This will also be solved by checking for a null url before calling the |
Signed-off-by: Mark Herwege <[email protected]>
I didn't look carefully. Replaced now. |
Signed-off-by: Mark Herwege <[email protected]>
@holgerfriedrich I created a separate PR to remove all uses of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Signed-off-by: Mark Herwege <[email protected]>
Providing an invalid URI input was throwing an IllegalArgumentException from the underlying jetty library. This change properly catches it and throws an IOException instead, aligned with the error treatment in the rest of the method.
See also openhab/openhab-addons#18066