Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2013-12-17 05:17:37 -0500
committerMarkus Tiede2013-12-17 05:17:37 -0500
commit6db0f93f3e67d87918b31e418c8592932565dda5 (patch)
tree5cb1768495de4c5df655e8b9e1f5ad4855aa07d5 /org.eclipse.jubula.autagent
parentd488a87d1a960ed3cff11d6178095364c80b43e5 (diff)
downloadorg.eclipse.jubula.core-6db0f93f3e67d87918b31e418c8592932565dda5.tar.gz
org.eclipse.jubula.core-6db0f93f3e67d87918b31e418c8592932565dda5.tar.xz
org.eclipse.jubula.core-6db0f93f3e67d87918b31e418c8592932565dda5.zip
Sprint task - fix for p1 issue http://bugzilla.bredex.de/1288 - 2nd try
Diffstat (limited to 'org.eclipse.jubula.autagent')
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAutServer.java21
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialogBP.java3
2 files changed, 12 insertions, 12 deletions
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAutServer.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAutServer.java
index cdebf0e32..ffb0edbbd 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAutServer.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAutServer.java
@@ -20,6 +20,7 @@ import java.util.StringTokenizer;
import java.util.Vector;
import org.eclipse.jubula.autagent.AutStarter;
+import org.eclipse.jubula.communication.Communicator;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
import org.eclipse.jubula.tools.constants.CommandConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
@@ -71,9 +72,10 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
if (isRunningFromExecutable(parameters)) {
// agent arguments
String serverPort = "null"; //$NON-NLS-1$
- if (AutStarter.getInstance().getAutCommunicator() != null) {
- serverPort = String.valueOf(AutStarter.getInstance()
- .getAutCommunicator().getLocalPort());
+ final Communicator autCommunicator = AutStarter.getInstance()
+ .getAutCommunicator();
+ if (autCommunicator != null) {
+ serverPort = String.valueOf(autCommunicator.getLocalPort());
}
env += ENV_SEPARATOR + "AUT_SERVER_PORT=" + serverPort; ////$NON-NLS-1$
@@ -169,10 +171,10 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
protected void createAutServerClasspath(StringBuffer autServerClasspath,
List cmds, Map parameters) {
- if (AutStarter.getInstance().getAutCommunicator() != null) {
- cmds.add(String.valueOf(
- AutStarter.getInstance().getAutCommunicator()
- .getLocalPort()));
+ final Communicator autCommunicator = AutStarter.getInstance()
+ .getAutCommunicator();
+ if (autCommunicator != null) {
+ cmds.add(String.valueOf(autCommunicator.getLocalPort()));
} else {
cmds.add("null"); //$NON-NLS-1$
}
@@ -239,8 +241,7 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
cmds.add("-classpath"); //$NON-NLS-1$
StringBuffer autClassPath = createAutClasspath(parameters);
String serverBasePath = createServerBasePath();
- cmds.add(
- autClassPath.append(PATH_SEPARATOR)
+ cmds.add(autClassPath.append(PATH_SEPARATOR)
.append(serverBasePath).toString());
// add classname of autLauncher
cmds.add(CommandConstants.AUT_SERVER_LAUNCHER);
@@ -268,7 +269,7 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
}
}
- // add debug options (if neccessary)
+ // add debug options (if necessary)
addDebugParams(cmds, false);
// add -Duser.dir and workingDir here
}
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialogBP.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialogBP.java
index b61faffe7..9324bea17 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialogBP.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialogBP.java
@@ -352,8 +352,7 @@ public class ChooseCheckModeDialogBP {
AutStarter.getInstance().getAutCommunicator();
if (autCommunicator != null
&& autCommunicator.getConnection() != null) {
- AutStarter.getInstance().getAutCommunicator().send(
- responseMsg);
+ autCommunicator.send(responseMsg);
}
} catch (CommunicationException e) {
LOG.error("Error sending message!", e); //$NON-NLS-1$

Back to the top