Reputation: 12905
Not all invalid urls will be consider as invalid by java.net.URL/URI
An example: http:www.google.com
Is it a bug or is it a feature?
Or is maybe the string above a valid url?
Upvotes: 1
Views: 542
Reputation: 159086
Without //
, the URL is treated as a relative URL, that needs a context to be useful.
If you try using it, you'll get this error:
IllegalArgumentException: protocol = http host = null
Upvotes: 2