mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8256461: AbstractFileSystemProvider.getSunPathForSocketCall for empty Path returns '.'
Reviewed-by: dfuchs, alanb
This commit is contained in:
parent
d30956055b
commit
6948456dbf
5 changed files with 60 additions and 3 deletions
|
@ -105,6 +105,9 @@ class UnixDomainSockets {
|
|||
|
||||
static void bind(FileDescriptor fd, Path addr) throws IOException {
|
||||
byte[] path = getPathBytes(addr);
|
||||
if (path.length == 0) {
|
||||
throw new BindException("Server socket cannot bind to unnamed address");
|
||||
}
|
||||
bind0(fd, path);
|
||||
}
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ public abstract class AbstractFileSystemProvider extends FileSystemProvider {
|
|||
/**
|
||||
* Returns a path name as bytes for a Unix domain socket.
|
||||
* Different encodings may be used for these names on some platforms.
|
||||
* If path is empty, then an empty byte[] is returned.
|
||||
*/
|
||||
public abstract byte[] getSunPathForSocketFile(Path file);
|
||||
public abstract byte[] getSunPathForSocketFile(Path path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue