Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/net/bsd/RExecClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class RExecClient extends SocketClient {
*/
public static final int DEFAULT_PORT = 512;

private boolean remoteVerificationEnabled;
private boolean remoteVerificationEnabled = true;

/**
* If a separate error stream is requested, {@code _errorStream_} will point to an InputStream from which the standard error of the remote process can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -52,4 +53,9 @@ void testGetInputStream() throws IOException {
}
}

@Test
void testRemoteVerificationEnabledByDefault() {
assertTrue(newClient().isRemoteVerificationEnabled());
}

}
6 changes: 6 additions & 0 deletions src/test/java/org/apache/commons/net/bsd/RExecClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -67,4 +68,9 @@ void testGetOutputStream() throws IOException {
}
}

@Test
void testRemoteVerificationEnabledByDefault() {
assertTrue(newClient().isRemoteVerificationEnabled());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -52,4 +53,9 @@ void testGetInputStream() throws IOException {
}
}

@Test
void testRemoteVerificationEnabledByDefault() {
assertTrue(newClient().isRemoteVerificationEnabled());
}

}