A DESCRIPTION OF THE REQUEST :
It is not possible to create an URL which should use web sockets protocol.
new URL("ws://foo.bar/"); throws a malformed url exception even though this protocol should be legal.
WebSockets specifications can be found at
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76
As it is stated in the spec "ws" is used for this protocol.
JUSTIFICATION :
Based on the fact that web sockets become more and more popular within web applications, and there are more and more web servers that use them as well as more and more applications that need to use it, it would be good if the protocol is marked legal in jdk.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
URL instance should be created.
ACTUAL -
MalformedURLException is thrown.
---------- BEGIN SOURCE ----------
new URL("ws://foo.bar");
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I guess vanilla strings could be used.