RFR (S) 8230407 : SocketPermission and FilePermission action list allows leading comma

Ivan Gerasimov ivan.gerasimov at oracle.com
Tue Oct 1 20:26:05 UTC 2019


Hello!

The constructors of SocketPermission and FilePermission expect a String 
argument with comma-separated list of actions.

If the list is malformed, then the constructors throw 
IllegalArgumentException.

It turns out that the current implementation fails to throw IAE if the 
list starts with a leading comma.

Would you please help review a simple fix, which will make the behavior 
more consistent?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8230407
WEBREV: http://cr.openjdk.java.net/~igerasim/8230407/00/webrev/

-- 
With kind regards,
Ivan Gerasimov



More information about the core-libs-dev mailing list