8261880: Change nested classes in java.base to static nested classes where possible
Reviewed-by: redestad
This commit is contained in:
parent
459abd561a
commit
9425d3de83
@ -53,7 +53,7 @@ public final class KeychainStore extends KeyStoreSpi {
|
|||||||
// If a key came from the keychain it has a SecKeyRef and one or more
|
// If a key came from the keychain it has a SecKeyRef and one or more
|
||||||
// SecCertificateRef. When we delete the key we have to delete all of the corresponding
|
// SecCertificateRef. When we delete the key we have to delete all of the corresponding
|
||||||
// native objects.
|
// native objects.
|
||||||
class KeyEntry {
|
static class KeyEntry {
|
||||||
Date date; // the creation date of this entry
|
Date date; // the creation date of this entry
|
||||||
byte[] protectedPrivKey;
|
byte[] protectedPrivKey;
|
||||||
char[] password;
|
char[] password;
|
||||||
@ -63,7 +63,7 @@ public final class KeychainStore extends KeyStoreSpi {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Trusted certificates
|
// Trusted certificates
|
||||||
class TrustedCertEntry {
|
static class TrustedCertEntry {
|
||||||
Date date; // the creation date of this entry
|
Date date; // the creation date of this entry
|
||||||
|
|
||||||
Certificate cert;
|
Certificate cert;
|
||||||
@ -883,7 +883,7 @@ public final class KeychainStore extends KeyStoreSpi {
|
|||||||
entries.put(alias.toLowerCase(), ke);
|
entries.put(alias.toLowerCase(), ke);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CertKeychainItemPair {
|
private static class CertKeychainItemPair {
|
||||||
long mCertificateRef;
|
long mCertificateRef;
|
||||||
Certificate mCert;
|
Certificate mCert;
|
||||||
|
|
||||||
|
@ -620,7 +620,7 @@ final class StackStreamFactory {
|
|||||||
super(walker, FILL_CLASS_REFS_ONLY|GET_CALLER_CLASS);
|
super(walker, FILL_CLASS_REFS_ONLY|GET_CALLER_CLASS);
|
||||||
}
|
}
|
||||||
|
|
||||||
final class ClassBuffer extends FrameBuffer<Class<?>> {
|
static final class ClassBuffer extends FrameBuffer<Class<?>> {
|
||||||
Class<?>[] classes; // caller class for fast path
|
Class<?>[] classes; // caller class for fast path
|
||||||
ClassBuffer(int batchSize) {
|
ClassBuffer(int batchSize) {
|
||||||
super(batchSize);
|
super(batchSize);
|
||||||
|
@ -176,7 +176,7 @@ public final
|
|||||||
class Inet6Address extends InetAddress {
|
class Inet6Address extends InetAddress {
|
||||||
static final int INADDRSZ = 16;
|
static final int INADDRSZ = 16;
|
||||||
|
|
||||||
private class Inet6AddressHolder {
|
private static class Inet6AddressHolder {
|
||||||
|
|
||||||
private Inet6AddressHolder() {
|
private Inet6AddressHolder() {
|
||||||
ipaddress = new byte[INADDRSZ];
|
ipaddress = new byte[INADDRSZ];
|
||||||
|
@ -566,6 +566,6 @@ public class ProtectionDomain {
|
|||||||
/**
|
/**
|
||||||
* Used for storing ProtectionDomains as keys in a Map.
|
* Used for storing ProtectionDomains as keys in a Map.
|
||||||
*/
|
*/
|
||||||
final class Key {}
|
static final class Key {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public final class ServicesCatalog {
|
|||||||
/**
|
/**
|
||||||
* Represents a service provider in the services catalog.
|
* Represents a service provider in the services catalog.
|
||||||
*/
|
*/
|
||||||
public final class ServiceProvider {
|
public static final class ServiceProvider {
|
||||||
private final Module module;
|
private final Module module;
|
||||||
private final String providerName;
|
private final String providerName;
|
||||||
|
|
||||||
|
@ -578,7 +578,7 @@ public class XMLStreamWriterImpl implements XMLStreamWriter {
|
|||||||
* Start of Internal classes.
|
* Start of Internal classes.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected class Element {
|
protected static class Element {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the parent element
|
* the parent element
|
||||||
|
@ -289,7 +289,7 @@ public class FtpClient extends sun.net.ftp.FtpClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MLSxParser implements FtpDirParser {
|
private static class MLSxParser implements FtpDirParser {
|
||||||
public FtpDirEntry parseLine(String line) {
|
public FtpDirEntry parseLine(String line) {
|
||||||
String name = null;
|
String name = null;
|
||||||
int i = line.lastIndexOf(';');
|
int i = line.lastIndexOf(';');
|
||||||
@ -1762,7 +1762,7 @@ public class FtpClient extends sun.net.ftp.FtpClient {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class FtpFileIterator implements Iterator<FtpDirEntry>, Closeable {
|
private static class FtpFileIterator implements Iterator<FtpDirEntry>, Closeable {
|
||||||
|
|
||||||
private BufferedReader in = null;
|
private BufferedReader in = null;
|
||||||
private FtpDirEntry nextFile = null;
|
private FtpDirEntry nextFile = null;
|
||||||
|
@ -121,7 +121,7 @@ public class FtpURLConnection extends URLConnection {
|
|||||||
* - The command socket (FtpClient).
|
* - The command socket (FtpClient).
|
||||||
* Since that's the only class that needs to see that, it is an inner class.
|
* Since that's the only class that needs to see that, it is an inner class.
|
||||||
*/
|
*/
|
||||||
protected class FtpInputStream extends FilterInputStream {
|
protected static class FtpInputStream extends FilterInputStream {
|
||||||
FtpClient ftp;
|
FtpClient ftp;
|
||||||
FtpInputStream(FtpClient cl, InputStream fd) {
|
FtpInputStream(FtpClient cl, InputStream fd) {
|
||||||
super(new BufferedInputStream(fd));
|
super(new BufferedInputStream(fd));
|
||||||
@ -144,7 +144,7 @@ public class FtpURLConnection extends URLConnection {
|
|||||||
* - The command socket (FtpClient).
|
* - The command socket (FtpClient).
|
||||||
* Since that's the only class that needs to see that, it is an inner class.
|
* Since that's the only class that needs to see that, it is an inner class.
|
||||||
*/
|
*/
|
||||||
protected class FtpOutputStream extends FilterOutputStream {
|
protected static class FtpOutputStream extends FilterOutputStream {
|
||||||
FtpClient ftp;
|
FtpClient ftp;
|
||||||
FtpOutputStream(FtpClient cl, OutputStream fd) {
|
FtpOutputStream(FtpClient cl, OutputStream fd) {
|
||||||
super(fd);
|
super(fd);
|
||||||
|
@ -884,7 +884,7 @@ abstract class DomainKeyStore extends KeyStoreSpi {
|
|||||||
/*
|
/*
|
||||||
* Utility class that holds the components used to construct a KeyStore.Builder
|
* Utility class that holds the components used to construct a KeyStore.Builder
|
||||||
*/
|
*/
|
||||||
class KeyStoreBuilderComponents {
|
static class KeyStoreBuilderComponents {
|
||||||
String name;
|
String name;
|
||||||
String type;
|
String type;
|
||||||
Provider provider;
|
Provider provider;
|
||||||
|
@ -777,7 +777,7 @@ public abstract class IntegerPolynomial implements IntegerFieldModuloP {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Limb implements SmallValue {
|
static class Limb implements SmallValue {
|
||||||
int value;
|
int value;
|
||||||
|
|
||||||
Limb(int value) {
|
Limb(int value) {
|
||||||
|
@ -50,7 +50,7 @@ public class NTLMAuthSequence {
|
|||||||
// Used by native code to indicate when a particular protocol sequence is completed
|
// Used by native code to indicate when a particular protocol sequence is completed
|
||||||
// and must not be re-used.
|
// and must not be re-used.
|
||||||
|
|
||||||
class Status {
|
static class Status {
|
||||||
boolean sequenceComplete;
|
boolean sequenceComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user