equal
deleted
inserted
replaced
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(); |