RFR 8163482: java.net.URLPermission.getActions() adds a trailing colon when header-names is empty

Chris Hegarty chris.hegarty at oracle.com
Thu Oct 6 11:16:07 UTC 2016


> On 6 Oct 2016, at 08:31, Vyom Tewari <vyom.tewari at oracle.com> wrote:
> 
> Hi All,
> 
> Please find the spec change for below issue.
> 
> BugId      : https://bugs.openjdk.java.net/browse/JDK-8163482
> 
> Webrev   : http://cr.openjdk.java.net/~vtewari/8163482/webrev0.0/index.html <http://cr.openjdk.java.net/%7Evtewari/8163482/webrev0.0/index.html>

Thanks Vyom, this looks good. 

-Chris.

> The reason of this change  is a side effect of a recent past fix [1] changed the behavior of URLPermission to omit the colon separator when the request headers list is empty (the spec allows this). However some previously existing tests started failing [2] because of that.
> 
> As the spec allows the colon separator to be always  present, whether the request list is empty or not. For the sake of backward compatibility with existing code that might expect getActions() to always return a string containing a colon we chooses the conservative approach and continue to add the colon separator in all cases.
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8114860
> [2] https://bugs.openjdk.java.net/browse/JDK-8161291
> 
> Note: i will file a CCC for this spec change.
> 
> Thanks,
> 
> Vyom
> 



More information about the net-dev mailing list