src/java.base/windows/classes/sun/nio/fs/WindowsLinkSupport.java
changeset 53018 8bf9268df0e2
parent 47216 71c04702a3d5
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   327             unsafe.copyMemory(null, buffer.address() + OFFSETOF_PATHBUFFER + nameOffset,
   327             unsafe.copyMemory(null, buffer.address() + OFFSETOF_PATHBUFFER + nameOffset,
   328                 name, Unsafe.ARRAY_CHAR_BASE_OFFSET, nameLengthInBytes);
   328                 name, Unsafe.ARRAY_CHAR_BASE_OFFSET, nameLengthInBytes);
   329 
   329 
   330             // remove special prefix
   330             // remove special prefix
   331             String target = stripPrefix(new String(name));
   331             String target = stripPrefix(new String(name));
   332             if (target.length() == 0) {
   332             if (target.isEmpty()) {
   333                 throw new IOException("Symbolic link target is invalid");
   333                 throw new IOException("Symbolic link target is invalid");
   334             }
   334             }
   335             return target;
   335             return target;
   336         } finally {
   336         } finally {
   337             buffer.release();
   337             buffer.release();