RFR 8027687: The constructors of URLPermission class do not behave as described in javadoc
Michael McMahon
michael.x.mcmahon at oracle.com
Fri Nov 1 13:28:13 PDT 2013
On 01/11/13 18:06, Mike Duigou wrote:
> A couple minor quibbles
>
> - Since the length is know the StringBuildiler can be created with a size.
Right, 255 is probably a good size to use.
> - sb.toString() is probably more efficient than new String(sb)
Since Chris also suggests it, I'm curious why this is. Is there some
clever sharing going on between
StringBuilder and String?
> - I would like to see some IDN URL cases in the tests.
The first version of this class doesn't support Unicode strings in the
hostname labels.
So, I'm guessing you mean cases of IDNs that have been already converted
into the ascii encoded form (eg xn--blahblah.xn-blah.com). Something
I'd like to do
for JDK 9 will be to allow transparent Unicode in classes like
URLPermission with
automatic IDN conversions taking place in the http protocol handler.
So, I can add some cases of encoded IDNs in the test okay.
Thanks!
Michael
> Mike
>
> On Nov 1 2013, at 07:46 , Michael McMahon <michael.x.mcmahon at oracle.com> wrote:
>
>> Simple bug fix to new URLPermission class, caused by insufficient parameter checking
>> of the constructor.
>>
>> webrev: http://cr.openjdk.java.net/~michaelm/8027687/webrev.1/
>>
>> Thanks,
>> Michael
More information about the net-dev
mailing list