In class level specification something like BNF for constructor parameter is specified. However behavior in case of violation of such grammar is not specified.
JDK usually throws IAE however absense of expection specification means that other implementations may behave in different manner violating "compile once run everywhere" idea.
Yet sometimes JDK does not throw any exception event if grammar is violated:
* '*' is allowed as port number violating rule
portrange = portnumber | -portnumber | portnumber-[portnumber]
* port number may be empty while ':' is used violating rule
host = (hostname | IPv4address | iPv6reference) [:portrange]
* lead/trailng spaces are allowed in action names
* action comparison looks case-insentive (while it is specified nowhere)
I thing it would be useful to add something like "IAE is thrown if grammar for either host or action is violated" and clarify case-sensitivity for actions (for hostnames it is clear that they are case-insensitivy as consequrence of RFCs for DNS).
JDK usually throws IAE however absense of expection specification means that other implementations may behave in different manner violating "compile once run everywhere" idea.
Yet sometimes JDK does not throw any exception event if grammar is violated:
* '*' is allowed as port number violating rule
portrange = portnumber | -portnumber | portnumber-[portnumber]
* port number may be empty while ':' is used violating rule
host = (hostname | IPv4address | iPv6reference) [:portrange]
* lead/trailng spaces are allowed in action names
* action comparison looks case-insentive (while it is specified nowhere)
I thing it would be useful to add something like "IAE is thrown if grammar for either host or action is violated" and clarify case-sensitivity for actions (for hostnames it is clear that they are case-insensitivy as consequrence of RFCs for DNS).
- duplicates
-
JDK-8230407 SocketPermission and FilePermission action list allows leading comma
-
- Closed
-
- relates to
-
JDK-6533031 Non-clear semantics of "localhost" for SocketPermission
-
- Open
-