File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
java/client/src/org/openqa/selenium/os Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ java_library(
3
3
srcs = glob (['*.java' ]),
4
4
deps = [
5
5
'//java/client/src/org/openqa/selenium:webdriver-api' ,
6
+ '//java/client/src/org/openqa/selenium/io' ,
6
7
'//third_party/java/commons-exec:commons-exec' ,
7
8
'//third_party/java/guava:guava' ,
8
9
'//third_party/java/jna:jna' ,
Original file line number Diff line number Diff line change 31
31
import org .apache .commons .exec .Executor ;
32
32
import org .apache .commons .exec .PumpStreamHandler ;
33
33
import org .openqa .selenium .WebDriverException ;
34
+ import org .openqa .selenium .io .CircularOutputStream ;
34
35
35
36
import java .io .ByteArrayInputStream ;
36
- import java .io .ByteArrayOutputStream ;
37
37
import java .io .File ;
38
38
import java .io .IOException ;
39
39
import java .io .OutputStream ;
46
46
class UnixProcess implements OsProcess {
47
47
private static final Logger log = Logger .getLogger (UnixProcess .class .getName ());
48
48
49
- private final ByteArrayOutputStream inputOut = new ByteArrayOutputStream ( );
49
+ private final CircularOutputStream inputOut = new CircularOutputStream ( null );
50
50
private volatile String allInput ;
51
51
private final DefaultExecuteResultHandler handler = new DefaultExecuteResultHandler ();
52
52
private final Executor executor = new DaemonExecutor ();
@@ -178,7 +178,7 @@ public String getStdOut() {
178
178
throw new IllegalStateException (
179
179
"Cannot get output before executing command line: " + cl );
180
180
}
181
- return new String ( inputOut .toByteArray () );
181
+ return inputOut .toString ( );
182
182
}
183
183
184
184
public void setInput (String allInput ) {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ java_library(name = "os",
3
3
srcs = [ "*.java" ],
4
4
deps = [
5
5
"//java/client/src/org/openqa/selenium:base",
6
+ "//java/client/src/org/openqa/selenium/io",
6
7
"//third_party/java/commons-exec",
7
8
"//third_party/java/guava",
8
9
"//third_party/java/jna",
You can’t perform that action at this time.
0 commit comments