diff options
Diffstat (limited to 'tests/test-extensions/net/sourceforge')
3 files changed, 11 insertions, 21 deletions
diff --git a/tests/test-extensions/net/sourceforge/jnlp/ContentReader.java b/tests/test-extensions/net/sourceforge/jnlp/ContentReader.java index dd7ab89..da47f6e 100644 --- a/tests/test-extensions/net/sourceforge/jnlp/ContentReader.java +++ b/tests/test-extensions/net/sourceforge/jnlp/ContentReader.java @@ -52,7 +52,7 @@ class ContentReader implements Runnable { StringBuilder sb = new StringBuilder(); private final InputStream is; private boolean done; - final List<ContentReaderListener> listeners = new ArrayList(1); + final List<ContentReaderListener> listeners = new ArrayList<ContentReaderListener>(1); public String getContent() { return sb.toString(); 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); diff --git a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java index 31e81ad..6f45a23 100644 --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java @@ -55,6 +55,7 @@ import java.net.ServerSocket; import java.net.URL; import java.util.ArrayList; import java.util.List; +import net.sourceforge.jnlp.ProcessResult; import net.sourceforge.jnlp.browsertesting.Browser; import net.sourceforge.jnlp.browsertesting.BrowserFactory; import net.sourceforge.jnlp.browsertesting.Browsers; @@ -270,7 +271,7 @@ public class ServerAccess { if (this.currentBrowser==null) return null; List<String> l1=this.currentBrowser.getComaptibilitySwitches(); List<String> l2=this.currentBrowser.getDefaultSwitches(); - List<String> l= new ArrayList(); + List<String> l= new ArrayList<String>(); if (l1!=null)l.addAll(l1); if (l2!=null)l.addAll(l2); return l; @@ -832,15 +833,4 @@ public class ServerAccess { return new ProcessWrapper(args, dir, stdoutl, stderrl, vars).execute(); } - /** - * this is temprary solution until refactoring is fully done - * Use net.sourceforge.jnlp.ProcessResult instead - */ - @Deprecated - public static class ProcessResult extends net.sourceforge.jnlp.ProcessResult { - - public ProcessResult(String stdout, String stderr, Process process, boolean wasTerminated, Integer r, Throwable deadlyException) { - super(stdout, stderr, process, wasTerminated, r, deadlyException); - } - } - } +} |