Skip to content

Commit

Permalink
Make private static classes final
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 10, 2023
1 parent f514c6e commit 1a7a8dd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
*/
public final class IMAPExportMbox {

private static class MboxListener implements IMAPChunkListener {
private static final class MboxListener implements IMAPChunkListener {

private final BufferedWriter bufferedWriter;
volatile AtomicInteger total = new AtomicInteger();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/net/ftp/FTPClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
public class FTPClient extends FTP implements Configurable {

// @since 3.0
private static class CSL implements CopyStreamListener {
private static final class CSL implements CopyStreamListener {

private final FTPClient parent;
private final long idleMillis;
Expand Down Expand Up @@ -337,7 +337,7 @@ public String resolve(final String hostname) throws UnknownHostException {
}
}

private static class PropertiesSingleton {
private static final class PropertiesSingleton {

static final Properties PROPERTIES;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
*/
public final class KeyManagerUtils {

private static class ClientKeyStore {
private static final class ClientKeyStore {

private final X509Certificate[] certChain;
private final PrivateKey key;
Expand Down Expand Up @@ -93,7 +93,7 @@ final PrivateKey getPrivateKey() {
}
}

private static class X509KeyManager extends X509ExtendedKeyManager {
private static final class X509KeyManager extends X509ExtendedKeyManager {

private final ClientKeyStore keyStore;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
public final class TrustManagerUtils {

private static class TrustManager implements X509TrustManager {
private static final class TrustManager implements X509TrustManager {

private final boolean checkServerValidity;

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/apache/commons/net/ftp/FTPClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

public class FTPClientTest extends TestCase {

private static class LocalClient extends FTPClient {
private static final class LocalClient extends FTPClient {

private String systemType;

Expand All @@ -42,7 +42,7 @@ public void setSystemType(final String type) {
}
}

private static class PassiveNatWorkAroundLocalClient extends FTPClient {
private static final class PassiveNatWorkAroundLocalClient extends FTPClient {
private final String passiveModeServerIP;

public PassiveNatWorkAroundLocalClient(final String passiveModeServerIP) {
Expand Down

0 comments on commit 1a7a8dd

Please sign in to comment.