toRealPath throws InternalError: Should not get here on Windows (paths with junctions)

Rory O'Donnell rory.odonnell at oracle.com
Tue Mar 15 11:43:31 UTC 2016


Hi Dawid,

Can you log a bug and send me the JI, thanks ?

If you have more info you can share it would be useful to follow up on 
the nio-dev mailing list.
(http://mail.openjdk.java.net/mailman/listinfo/nio-dev)

Rgds,Rory

On 15/03/2016 11:28, Alan Bateman wrote:
> On 15/03/2016 11:19, Dawid Weiss wrote:
>> I couldn't find an appropriate bug in bugzilla, but this fails
>> reliably for me with Java 8 and 9 on Windows 10, 64-bit:
>>
>> mkdir foo
>> mklink /J bar foo
>> cd bar
>> java -cp Test .
>>
>> where Test.java is as simple as:
>>
>> import java.io.*;
>> import java.nio.file.*;
>>
>> public class Test {
>>    public static void main(String[] args) throws Exception {
>>      System.out.println("p.toRealPath(): " + 
>> Paths.get(args[0]).toRealPath());
>>    }
>> }
>>
>> The thrown error shows:
>>
>> Exception in thread "main" java.lang.InternalError: Should not get here
>>          at 
>> sun.nio.fs.WindowsNativeDispatcher.GetFinalPathNameByHandle(Native
>> Method)
> There are a number of win32 functions that this code uses 
> GetProcAddress to get their address in kernel32. This dates back to 
> when we had to support Windows XP. This should be cleaned up now. 
> Doesn't explain why you are seeing though, can you submit a bug?
>
> -Alan

-- 
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland




More information about the core-libs-dev mailing list