Skip to content

Commit

Permalink
Better internal name
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Feb 24, 2024
1 parent 29aa550 commit 1609043
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,18 @@
import java.util.zip.InflaterInputStream;

/**
* Wrapper class for FTP data channel sockets when using MODE Z. All methods
* except of {@link #getInputStream()} and {@link #getOutputStream()} are
* calling the delegate methods directly.
* Wrapper class for FTP data channel sockets when compressing data in the "deflate" compression format. All methods except of {@link #getInputStream()} and
* {@link #getOutputStream()} are calling the delegate methods directly.
*/
class ModeZSocket extends Socket {
class DeflateSocket extends Socket {

static Socket wrap(final Socket plain) {
return new ModeZSocket(plain);
return new DeflateSocket(plain);
}

private final Socket delegate;

private ModeZSocket(final Socket delegate) {
private DeflateSocket(final Socket delegate) {
this.delegate = delegate;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/net/ftp/FTPClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -3421,7 +3421,7 @@ public boolean structureMount(final String pathname) throws IOException {

private Socket wrapSocketIfModeZisEnabled(final Socket plainSocket) {
if (fileTransferMode == COMPRESSED_MODE_Z_TRANSFER_MODE) {
return ModeZSocket.wrap(plainSocket);
return DeflateSocket.wrap(plainSocket);
}
return plainSocket;
}
Expand Down

0 comments on commit 1609043

Please sign in to comment.