mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8245623: Remove unused code in sun/nio/fs after Solaris removal
Reviewed-by: alanb
This commit is contained in:
parent
de37507b8e
commit
b2269be8db
4 changed files with 3 additions and 23 deletions
|
@ -103,16 +103,6 @@ class UnixChannelFactory {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a file channel from an existing (open) file descriptor
|
||||
*/
|
||||
static FileChannel newFileChannel(int fd, String path, boolean reading, boolean writing) {
|
||||
FileDescriptor fdObj = new FileDescriptor();
|
||||
fdAccess.set(fdObj, fd);
|
||||
return FileChannelImpl.open(fdObj, path, reading, writing, false, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a file channel by opening a file using a dfd/path pair
|
||||
*/
|
||||
|
|
|
@ -100,11 +100,6 @@ class UnixException extends Exception {
|
|||
return new FileSystemException(file, other, errorString());
|
||||
}
|
||||
|
||||
void rethrowAsIOException(String file) throws IOException {
|
||||
IOException x = translateToIOException(file, null);
|
||||
throw x;
|
||||
}
|
||||
|
||||
void rethrowAsIOException(UnixPath file, UnixPath other) throws IOException {
|
||||
String a = (file == null) ? null : file.getPathForExceptionMessage();
|
||||
String b = (other == null) ? null : other.getPathForExceptionMessage();
|
||||
|
|
|
@ -34,7 +34,6 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.io.IOException;
|
||||
import java.io.FilePermission;
|
||||
import java.util.*;
|
||||
import java.security.AccessController;
|
||||
|
||||
import sun.nio.ch.ThreadPool;
|
||||
import sun.security.util.SecurityConstants;
|
||||
|
|
|
@ -67,10 +67,6 @@ class UnixUserPrincipals {
|
|||
throw new AssertionError();
|
||||
}
|
||||
|
||||
boolean isSpecial() {
|
||||
return id == -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
|
@ -113,7 +109,7 @@ class UnixUserPrincipals {
|
|||
|
||||
// return UserPrincipal representing given uid
|
||||
static User fromUid(int uid) {
|
||||
String name = null;
|
||||
String name;
|
||||
try {
|
||||
name = Util.toString(getpwuid(uid));
|
||||
} catch (UnixException x) {
|
||||
|
@ -124,7 +120,7 @@ class UnixUserPrincipals {
|
|||
|
||||
// return GroupPrincipal representing given gid
|
||||
static Group fromGid(int gid) {
|
||||
String name = null;
|
||||
String name;
|
||||
try {
|
||||
name = Util.toString(getgrgid(gid));
|
||||
} catch (UnixException x) {
|
||||
|
@ -141,7 +137,7 @@ class UnixUserPrincipals {
|
|||
if (sm != null) {
|
||||
sm.checkPermission(new RuntimePermission("lookupUserInformation"));
|
||||
}
|
||||
int id = -1;
|
||||
int id;
|
||||
try {
|
||||
id = (isGroup) ? getgrnam(name) : getpwnam(name);
|
||||
} catch (UnixException x) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue