diff options
author | Andrew Azores <[email protected]> | 2013-11-07 09:59:22 -0500 |
---|---|---|
committer | Andrew Azores <[email protected]> | 2013-11-07 09:59:22 -0500 |
commit | cc383fcf7288977d01608d9da4d9d84d167e1aad (patch) | |
tree | f5b899aa9cd705f7d1aba497874c8c787018903d /tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java | |
parent | 8f59c1b0bf5fed4fce80ebcc0bc588e62dde706d (diff) |
Reproducer test cleanup to remove deprecation warnings and type checking warnings.
ServerAccess.ProcessResult removed and reference replaced with ProcessResult.
junit.framework.assert replaced in favour of org.junit.Assert.
Added parameterized typing to instantiation of several fields and local variables
where the declaration was already parameterized.
Diffstat (limited to 'tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java')
-rw-r--r-- | tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java b/tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java index 9b2dbbb..6c9cdd4 100644 --- a/tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java +++ b/tests/test-extensions/net/sourceforge/jnlp/ProcessWrapper.java @@ -56,8 +56,8 @@ public class ProcessWrapper { private List<String> args; private File dir; - private final List<ContentReaderListener> stdoutl = new ArrayList(1); - private final List<ContentReaderListener> stderrl = new ArrayList(1); + private final List<ContentReaderListener> stdoutl = new ArrayList<ContentReaderListener>(1); + private final List<ContentReaderListener> stderrl = new ArrayList<ContentReaderListener>(1); private String[] vars; private ReactingProcess reactingProcess; @@ -73,9 +73,9 @@ public class ProcessWrapper { Assert.assertNotNull(toBeExecuted); Assert.assertTrue(toBeExecuted.trim().length() > 1); if (otherargs == null) { - otherargs = new ArrayList(1); + otherargs = new ArrayList<String>(1); } - List<String> urledArgs = new ArrayList(otherargs); + List<String> urledArgs = new ArrayList<String>(otherargs); urledArgs.add(0, toBeExecuted); urledArgs.add(s); this.args = urledArgs; @@ -201,7 +201,7 @@ public class ProcessWrapper { this.vars = vars; } - public ServerAccess.ProcessResult execute() throws Exception { + public ProcessResult execute() throws Exception { if (reactingProcess !=null ){ reactingProcess.beforeProcess(""); }; @@ -222,7 +222,7 @@ public class ProcessWrapper { } if (t.deadlyException != null) { pa.setCanRun(false); - return new ServerAccess.ProcessResult("", "", null, true, Integer.MIN_VALUE, t.deadlyException); + return new ProcessResult("", "", null, true, Integer.MIN_VALUE, t.deadlyException); } ContentReader crs = new ContentReader(t.getP().getInputStream(), stdoutl); ContentReader cre = new ContentReader(t.getP().getErrorStream(), stderrl); @@ -244,7 +244,7 @@ public class ProcessWrapper { pa.setCanRun(false); // ServerAccess.logOutputReprint(t.getP().exitValue()); when process is killed, this throws exception - ServerAccess.ProcessResult pr = new ServerAccess.ProcessResult(crs.getContent(), cre.getContent(), t.getP(), pa.wasTerminated(), t.getExitCode(), null); + ProcessResult pr = new ProcessResult(crs.getContent(), cre.getContent(), t.getP(), pa.wasTerminated(), t.getExitCode(), null); if (ServerAccess.PROCESS_LOG) { ServerAccess.log(pr.stdout, true, false); ServerAccess.log(pr.stderr, false, true); |