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?
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
http://www.google.com.