RFR : 8181205:JRE fails to load/register security providers when started from UNC pathname

Seán Coffey sean.coffey at oracle.com
Tue Jun 6 17:21:13 UTC 2017



On 06/06/2017 16:28, Xuelei Fan wrote:
> Looks fine to me.
>
> There is no clear reason why Paths.get(uri).toFile().getParentFile() 
> works but not File(uri).getParentFile().  Would you mind add a comment 
> so that the code will not modified back to use File(uri) later?
Thanks for review. It seems to be a long standing issue with URL/URI 
interoperability .  If the URL contained extra slashes, the conversion 
works seamlessly. i.e.

works : new 
URL("file:////MyComputer/c/Java/jre1.8.0_131/lib/ext/access-bridge-32.jar"); 

buggy : new 
URL("file://MyComputer/c/Java/jre1.8.0_131/lib/ext/access-bridge-32.jar");

The Paths.get(URI) method handles the UNC path in the correct fashion.

I'll add this comment to the code :
// Use the Paths.get(uri) call in order to handle UNC based file name 
conversion correctly.

regards,
Sean.
> Thanks,
> Xuelei
>
> On 6/6/2017 1:40 AM, Seán Coffey wrote:
>> ping. Can I get a review for this please ?
>>
>> regards,
>> Sean.
>>
>>
>> On 01/06/2017 17:23, Seán Coffey wrote:
>>> The recent JDK-8163528 fix caused a regression for JDK binaries 
>>> launched with a UNC pathname. We can use the Paths class to create 
>>> the required File.  I managed to put a test together which should 
>>> test this code path.
>>>
>>> webrev : http://cr.openjdk.java.net/~coffeys/webrev.8181205/webrev/
>>> JBS record : https://bugs.openjdk.java.net/browse/JDK-8181205
>>>
>>> regards,
>>> Sean.
>>>
>>




More information about the security-dev mailing list