Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-01-20 08:58:11 -0500
committerMarkus Tiede2014-01-20 08:58:11 -0500
commit799ffaac21d26fa13a898781d584d045479fcc69 (patch)
tree466d94cfa1f4565c40e427e3107e3d34e0d74a15 /org.eclipse.jubula.autagent
parent7152949c7e0562cdad0609fa137c6239f536cb67 (diff)
downloadorg.eclipse.jubula.core-799ffaac21d26fa13a898781d584d045479fcc69.tar.gz
org.eclipse.jubula.core-799ffaac21d26fa13a898781d584d045479fcc69.tar.xz
org.eclipse.jubula.core-799ffaac21d26fa13a898781d584d045479fcc69.zip
Non-sprint task - minor refactoring: make use of generics.
Diffstat (limited to 'org.eclipse.jubula.autagent')
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/AutStarter.java5
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java9
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAutServer.java43
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartToolkitAut.java11
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/IStartAut.java2
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartHtmlAutServerCommand.java3
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartJavaFXAutServerCommand.java27
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartRcpAutServerCommand.java25
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwingAutServerCommand.java23
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwtAutServerCommand.java5
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/monitoring/MonitoringDataStore.java14
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialog.java14
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialogBP.java6
13 files changed, 85 insertions, 102 deletions
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/AutStarter.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/AutStarter.java
index df6d19b3d..241e52f15 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/AutStarter.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/AutStarter.java
@@ -95,7 +95,7 @@ public class AutStarter {
*/
private int m_stopAUTServerTimeout = 10000;
- /** the AUT Agent that is used for AUT registration and deregistration */
+ /** the AUT Agent that is used for AUT registration and de-registration */
private AutAgent m_agent;
/** sends messages using the Agent's communicator(s) */
@@ -693,5 +693,4 @@ public class AutStarter {
log.info("connection closed"); //$NON-NLS-1$
}
}
-
-}
+} \ No newline at end of file
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java
index 73f0b2d65..bc73ea01e 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java
@@ -252,7 +252,7 @@ public abstract class AbstractStartJavaAut extends AbstractStartToolkitAut {
* @param locale The <code>Locale</code> for the AUT.
* May be <code>null</code> if no locale was specified.
*/
- protected void addLocale(List cmds, Locale locale) {
+ protected void addLocale(List<String> cmds, Locale locale) {
if (locale != null) {
String country = locale.getCountry();
if (country != null && country.length() > 0) {
@@ -296,7 +296,8 @@ public abstract class AbstractStartJavaAut extends AbstractStartToolkitAut {
/**
* {@inheritDoc}
*/
- protected abstract String[] createCmdArray(String baseCmd, Map parameters);
+ protected abstract String[] createCmdArray(String baseCmd,
+ Map<String, Object> parameters);
/**
* @param parameters The parameters for starting the AUT.
@@ -313,7 +314,7 @@ public abstract class AbstractStartJavaAut extends AbstractStartToolkitAut {
* @return the _JAVA_OPTIONS environment variable including -javaagent
* and jre arguments
*/
- protected String setJavaOptions(Map parameters) {
+ protected String setJavaOptions(Map<String, Object> parameters) {
StringBuffer sb = new StringBuffer();
if (isRunningFromExecutable(parameters)) {
Locale locale = (Locale)parameters.get(IStartAut.LOCALE);
@@ -378,7 +379,7 @@ public abstract class AbstractStartJavaAut extends AbstractStartToolkitAut {
* @return agentString The agent String like -javaagent:myagent.jar
* or null if the monitoring agent String couldn't be generated
*/
- protected String getMonitoringAgent(Map parameters) {
+ protected String getMonitoringAgent(Map<String, Object> parameters) {
String autId = (String)parameters.get(
AutConfigConstants.AUT_ID);
MonitoringDataStore mds = MonitoringDataStore.getInstance();
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 ffb0edbbd..82dd0cc9e 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
@@ -52,16 +52,14 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
@Override
protected abstract String getServerClassName();
- @Override
- protected abstract String[] createCmdArray(String baseCmd, Map parameters);
-
/**
* Sets -javaagent, JRE arguments and the arguments for
* the AutServer as environment variables.
* @param parameters The parameters for starting the AUT
* @param autServerClasspath The classpath of the AUT Server
*/
- protected void setEnv(Map parameters, String autServerClasspath) {
+ protected void setEnv(Map<String, Object> parameters,
+ String autServerClasspath) {
String env = (String)parameters.get(AutConfigConstants.ENVIRONMENT);
if (env == null) {
env = StringConstants.EMPTY;
@@ -169,7 +167,7 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
* @param parameters The parameters for starting the AUT.
*/
protected void createAutServerClasspath(StringBuffer autServerClasspath,
- List cmds, Map parameters) {
+ List<String> cmds, Map parameters) {
final Communicator autCommunicator = AutStarter.getInstance()
.getAutCommunicator();
@@ -200,32 +198,33 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
}
/**
- * @param parameters The parameters for starting the AUT.
- * @return The arguments for the AUT that were found in the
- * given parameters.
+ * @param parameters
+ * The parameters for starting the AUT.
+ * @return The arguments for the AUT that were found in the given
+ * parameters.
*/
- protected List createAutArguments(Map parameters) {
- List argsList = new Vector();
- if (parameters.get(AutConfigConstants.AUT_RUN_AUT_ARGUMENTS)
- instanceof String[]) {
- String[] autArgs = (String[])parameters
- .get(AutConfigConstants.AUT_RUN_AUT_ARGUMENTS);
+ protected List<String> createAutArguments(Map<String, Object> parameters) {
+ List<String> argsList = new Vector<String>();
+ final Object autRunArgs = parameters.get(
+ AutConfigConstants.AUT_RUN_AUT_ARGUMENTS);
+ if (autRunArgs instanceof String[]) {
+ String[] autArgs = (String[]) autRunArgs;
return Arrays.asList(autArgs);
}
- String autArguments =
- (String)parameters.get(AutConfigConstants.AUT_ARGUMENTS);
-
+ String autArguments = (String) parameters
+ .get(AutConfigConstants.AUT_ARGUMENTS);
+
if (autArguments == null) {
autArguments = StringConstants.EMPTY;
}
-
- StringTokenizer args = new StringTokenizer(autArguments,
+
+ StringTokenizer args = new StringTokenizer(autArguments,
WHITESPACE_DELIMITER);
while (args.hasMoreTokens()) {
String arg = args.nextToken();
argsList.add(arg);
}
-
+
return argsList;
}
@@ -234,7 +233,7 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
* @param autServerClasspath the autServerClassPath to change
* @param parameters The parameters for starting the AUT.
*/
- protected void createAutServerLauncherClasspath(List cmds,
+ protected void createAutServerLauncherClasspath(List<String> cmds,
StringBuffer autServerClasspath, Map parameters) {
addBaseSettings(cmds, parameters);
@@ -254,7 +253,7 @@ public abstract class AbstractStartJavaAutServer extends AbstractStartJavaAut {
* @param cmds the commands list
* @param parameters The parameters for starting the AUT.
*/
- protected void addBaseSettings(List cmds, Map parameters) {
+ protected void addBaseSettings(List<String> cmds, Map parameters) {
// add locale
addLocale(cmds, (Locale)parameters.get(IStartAut.LOCALE));
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartToolkitAut.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartToolkitAut.java
index c3335dc3d..bc3e79109 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartToolkitAut.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartToolkitAut.java
@@ -59,8 +59,7 @@ public abstract class AbstractStartToolkitAut implements IStartAut {
*
* {@inheritDoc}
*/
- @SuppressWarnings("unchecked")
- public StartAUTServerStateMessage startAut(Map parameters)
+ public StartAUTServerStateMessage startAut(Map<String, Object> parameters)
throws IOException {
StartAUTServerStateMessage envCheckMsg = validateEnvironment();
if (envCheckMsg == null) {
@@ -131,7 +130,8 @@ public abstract class AbstractStartToolkitAut implements IStartAut {
* @param isAgentSet true if executable file and agent are set.
* @return the environment settings as array.
*/
- protected String[] createEnvArray(Map parameters, boolean isAgentSet) {
+ protected String[] createEnvArray(Map<String, Object> parameters,
+ boolean isAgentSet) {
m_isAgentSet = isAgentSet;
final String environment =
(String)parameters.get(AutConfigConstants.ENVIRONMENT);
@@ -179,7 +179,8 @@ public abstract class AbstractStartToolkitAut implements IStartAut {
* @return an <code>Array</code> of <code>String</code>s representing
* a command line.
*/
- protected abstract String [] createCmdArray(String baseCmd, Map parameters);
+ protected abstract String[] createCmdArray(String baseCmd,
+ Map<String, Object> parameters);
/**
* Executes the given command in the given environment with the
@@ -353,7 +354,7 @@ public abstract class AbstractStartToolkitAut implements IStartAut {
* @param isDirectExec
* true if the AUT is started by exec and not by a JVM
*/
- protected void addDebugParams(List cmds, boolean isDirectExec) {
+ protected void addDebugParams(List<String> cmds, boolean isDirectExec) {
final String rcDebug = IStartAut.RC_DEBUG;
if (rcDebug != null) {
if (isDirectExec) {
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/IStartAut.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/IStartAut.java
index 7a4da13a4..9f2854998 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/IStartAut.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/IStartAut.java
@@ -58,7 +58,7 @@ public interface IStartAut {
* condition or just tells the originator that the AUT was started correctly.
* @throws IOException if an I/O error occurs.
*/
- public StartAUTServerStateMessage startAut(Map parameters)
+ public StartAUTServerStateMessage startAut(Map<String, Object> parameters)
throws IOException;
}
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartHtmlAutServerCommand.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartHtmlAutServerCommand.java
index ffc707d58..d4f440f01 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartHtmlAutServerCommand.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartHtmlAutServerCommand.java
@@ -33,7 +33,8 @@ public class StartHtmlAutServerCommand extends AbstractStartPseudoJavaAUT {
* mapping from browser type (String) to corresponding
* Selenium browser command (String)
*/
- private static final Map BROWSER_TO_CMD_MAP = new HashMap();
+ private static final Map<String, String> BROWSER_TO_CMD_MAP =
+ new HashMap<String, String>();
static {
BROWSER_TO_CMD_MAP.put("Firefox", "*firefox"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartJavaFXAutServerCommand.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartJavaFXAutServerCommand.java
index 24fb41d93..3507f0377 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartJavaFXAutServerCommand.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartJavaFXAutServerCommand.java
@@ -18,8 +18,6 @@ import java.util.Vector;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
import org.eclipse.jubula.tools.constants.CommandConstants;
import org.eclipse.jubula.tools.utils.MonitoringUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* @author BREDEX GmbH
@@ -27,28 +25,21 @@ import org.slf4j.LoggerFactory;
*
*/
public class StartJavaFXAutServerCommand extends AbstractStartJavaAutServer {
-
- /** the logger */
- private static final Logger LOG = LoggerFactory
- .getLogger(StartJavaFXAutServerCommand.class);
-
- /** separates the environment variables */
- private static final String ENV_SEPARATOR = "\n"; //$NON-NLS-1$
-
- /** the classpath of the Aut Server */
+ /** the classpath of the AUT Server */
private String m_autServerClasspath = "AutServerClasspath"; //$NON-NLS-1$
/**
* {@inheritDoc}
*/
- protected String[] createCmdArray(String baseCmd, Map parameters) {
- List cmds = new Vector();
+ protected String[] createCmdArray(String baseCmd,
+ Map<String, Object> parameters) {
+ List<String> cmds = new Vector<String>();
cmds.add(baseCmd);
StringBuffer autServerClasspath = new StringBuffer();
createServerClasspath(autServerClasspath);
- List autAgentArgs = new ArrayList();
+ List<String> autAgentArgs = new ArrayList<String>();
autAgentArgs.add(String.valueOf(parameters
.get(AutConfigConstants.AUT_AGENT_HOST)));
autAgentArgs.add(String.valueOf(parameters
@@ -61,7 +52,7 @@ public class StartJavaFXAutServerCommand extends AbstractStartJavaAutServer {
parameters);
createAutServerClasspath(autServerClasspath, cmds, parameters);
cmds.addAll(autAgentArgs);
- // information for aut server that agent is not used
+ // information for AUT server that agent is not used
cmds.add(CommandConstants.RC_COMMON_AGENT_INACTIVE);
} else {
String serverBasePath = createServerBasePath();
@@ -90,8 +81,8 @@ public class StartJavaFXAutServerCommand extends AbstractStartJavaAutServer {
}
@Override
- protected String[] createEnvArray(Map parameters, boolean isAgentSet) {
-
+ protected String[] createEnvArray(Map<String, Object> parameters,
+ boolean isAgentSet) {
if (isRunningFromExecutable(parameters)
|| MonitoringUtil.shouldAndCanRunWithMonitoring(parameters)) {
setEnv(parameters, m_autServerClasspath);
@@ -100,10 +91,8 @@ public class StartJavaFXAutServerCommand extends AbstractStartJavaAutServer {
}
return super.createEnvArray(parameters, isAgentSet);
-
}
-
/**
*
* @return the class path corresponding to the receiver's RC bundle.
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartRcpAutServerCommand.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartRcpAutServerCommand.java
index 1f58116d9..de9913336 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartRcpAutServerCommand.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartRcpAutServerCommand.java
@@ -46,7 +46,7 @@ public class StartRcpAutServerCommand extends AbstractStartJavaAut {
* @param parameters The startup parameters for the AUT.
*/
private void createDirectAutJavaCallParameter(final String pathSeparator,
- List cmds, Map parameters) {
+ List<String> cmds, Map parameters) {
StringBuffer autClassPath = new StringBuffer();
String autClassPathValue = (String)parameters.get(
@@ -88,8 +88,8 @@ public class StartRcpAutServerCommand extends AbstractStartJavaAut {
* @param cmds the cmd list
* @param parameters The startup parameters for the AUT.
*/
- private void createDirectAutExeCallParameter(List cmds, Map parameters) {
-
+ private void createDirectAutExeCallParameter(List<String> cmds,
+ Map parameters) {
final String autArgs =
(String)parameters.get(AutConfigConstants.AUT_ARGUMENTS);
if (autArgs != null) {
@@ -108,13 +108,13 @@ public class StartRcpAutServerCommand extends AbstractStartJavaAut {
* @return a command line array as list with locale, JRE-parameters and
* optional debug parameters
*/
- private List createDirectAutJavaCall(final Map parameters) {
+ private List<String> createDirectAutJavaCall(final Map parameters) {
// create exec string array
- List cmds = new Vector();
+ List<String> cmds = new Vector<String>();
// add locale
addLocale(cmds, (Locale)parameters.get(IStartAut.LOCALE));
- // add jre params
+ // add JRE parameter
final String jreParams = (String)parameters.get(
AutConfigConstants.JRE_PARAMETER);
if (jreParams != null && jreParams.length() > 0) {
@@ -124,7 +124,7 @@ public class StartRcpAutServerCommand extends AbstractStartJavaAut {
cmds.add(tok.nextToken());
}
}
- // add debug options (if neccessary)
+ // add debug options (if necessary)
addDebugParams(cmds, true);
return cmds;
}
@@ -139,9 +139,10 @@ public class StartRcpAutServerCommand extends AbstractStartJavaAut {
/**
* {@inheritDoc}
*/
- protected String[] createCmdArray(String baseCmd, Map parameters) {
+ protected String[] createCmdArray(String baseCmd,
+ Map<String, Object> parameters) {
- List cmds;
+ List<String> cmds;
if (!isRunningFromExecutable(parameters)) {
// Start using java
@@ -152,7 +153,7 @@ public class StartRcpAutServerCommand extends AbstractStartJavaAut {
addLocale(cmds, (Locale)parameters.get(IStartAut.LOCALE));
} else {
// Start using executable file
- cmds = new Vector();
+ cmds = new Vector<String>();
cmds.add(0, baseCmd);
@@ -183,10 +184,10 @@ public class StartRcpAutServerCommand extends AbstractStartJavaAut {
}
/**
- *
* {@inheritDoc}
*/
- protected String[] createEnvArray(Map parameters, boolean isAgentSet) {
+ protected String[] createEnvArray(Map<String, Object> parameters,
+ boolean isAgentSet) {
String [] envArray = super.createEnvArray(parameters, isAgentSet);
if (envArray == null) {
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwingAutServerCommand.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwingAutServerCommand.java
index 433ccc8dd..17a29aadf 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwingAutServerCommand.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwingAutServerCommand.java
@@ -18,35 +18,28 @@ import java.util.Vector;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
import org.eclipse.jubula.tools.constants.CommandConstants;
import org.eclipse.jubula.tools.utils.MonitoringUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* @author BREDEX GmbH
* @created Jul 6, 2007
- *
*/
public class StartSwingAutServerCommand extends AbstractStartJavaAutServer {
-
- /** the logger */
- private static final Logger LOG =
- LoggerFactory.getLogger(StartSwingAutServerCommand.class);
-
- /** the classpath of the Aut Server */
+ /** the classpath of the AUT Server */
private String m_autServerClasspath = "AutServerClasspath"; //$NON-NLS-1$
/**
* {@inheritDoc}
*/
- protected String[] createCmdArray(String baseCmd, Map parameters) {
- List cmds = new Vector();
+ protected String[] createCmdArray(String baseCmd,
+ Map<String, Object> parameters) {
+ List<String> cmds = new Vector<String>();
cmds.add(baseCmd);
StringBuffer autServerClasspath = new StringBuffer();
createServerClasspath(autServerClasspath);
- List autAgentArgs = new ArrayList();
+ List<String> autAgentArgs = new ArrayList<String>();
autAgentArgs.add(String.valueOf(
parameters.get(AutConfigConstants.AUT_AGENT_HOST)));
autAgentArgs.add(String.valueOf(
@@ -59,7 +52,7 @@ public class StartSwingAutServerCommand extends AbstractStartJavaAutServer {
cmds, autServerClasspath, parameters);
createAutServerClasspath(autServerClasspath, cmds, parameters);
cmds.addAll(autAgentArgs);
- // information for aut server that agent is not used
+ // information for AUT server that agent is not used
cmds.add(CommandConstants.RC_COMMON_AGENT_INACTIVE);
} else {
String serverBasePath = createServerBasePath();
@@ -74,7 +67,8 @@ public class StartSwingAutServerCommand extends AbstractStartJavaAutServer {
}
@Override
- protected String[] createEnvArray(Map parameters, boolean isAgentSet) {
+ protected String[] createEnvArray(Map<String, Object> parameters,
+ boolean isAgentSet) {
if (isRunningFromExecutable(parameters)
|| MonitoringUtil.shouldAndCanRunWithMonitoring(parameters)) {
@@ -84,7 +78,6 @@ public class StartSwingAutServerCommand extends AbstractStartJavaAutServer {
}
return super.createEnvArray(parameters, isAgentSet);
-
}
/**
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwtAutServerCommand.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwtAutServerCommand.java
index 5dde6d65f..d29f6ac92 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwtAutServerCommand.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartSwtAutServerCommand.java
@@ -51,10 +51,10 @@ public class StartSwtAutServerCommand extends StartSwingAutServerCommand {
}
/**
- *
* {@inheritDoc}
*/
- protected String[] createEnvArray(Map parameters, boolean isAgentSet) {
+ protected String[] createEnvArray(Map<String, Object> parameters,
+ boolean isAgentSet) {
String [] envArray = super.createEnvArray(parameters, isAgentSet);
if (envArray == null) {
envArray = EnvironmentUtils.propToStrArray(
@@ -66,7 +66,6 @@ public class StartSwtAutServerCommand extends StartSwingAutServerCommand {
parameters, ENV_VAR_PREFIX, ENV_VALUE_SEP));
envArray = envList.toArray(new String [envList.size()]);
return envArray;
-
}
/**
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/monitoring/MonitoringDataStore.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/monitoring/MonitoringDataStore.java
index 4c93e9ada..c6761f735 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/monitoring/MonitoringDataStore.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/monitoring/MonitoringDataStore.java
@@ -13,7 +13,7 @@ import java.util.HashMap;
import java.util.Map;
/**
- * This MonitoringDataStore is a singelton and can be instantiated in the
+ * This MonitoringDataStore is a singleton and can be instantiated in the
* AutAgent. The AUTConfigMap for each AUT will be saved separately in this
* DataManager.
*
@@ -26,8 +26,8 @@ public class MonitoringDataStore {
private static MonitoringDataStore instance;
/** The list for data storage */
- private Map<String, Map<String, String>> m_dataStoreMap =
- new HashMap<String, Map<String, String>>();
+ private Map<String, Map<String, Object>> m_dataStoreMap =
+ new HashMap<String, Map<String, Object>>();
/** The list off current monitoring agents */
private Map<String, IMonitoring> m_monitoringAgentMap =
@@ -56,7 +56,7 @@ public class MonitoringDataStore {
* @param map The AutConfigMap for the given AutID
*/
public synchronized void putConfigMap(
- String autId, Map<String, String> map) {
+ String autId, Map<String, Object> map) {
m_dataStoreMap.put(autId, map);
}
/**
@@ -64,7 +64,7 @@ public class MonitoringDataStore {
* @param autId The autId
* @return The config map for the given autId
*/
- public Map<String, String> getConfigMap(String autId) {
+ public Map<String, Object> getConfigMap(String autId) {
return m_dataStoreMap.get(autId);
}
@@ -140,12 +140,12 @@ public class MonitoringDataStore {
/** use this method to get data from the MonitoringDataStore
* @param key The key for the stored data
* @param autID the AutID
- * @return The String data for the key or null if key dont exists
+ * @return The String data for the key or null if key don't exists
*/
public synchronized String getConfigValue(String autID, String key) {
if (m_dataStoreMap.containsKey(autID)) {
- return m_dataStoreMap.get(autID).get(key);
+ return (String)m_dataStoreMap.get(autID).get(key);
}
return null;
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialog.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialog.java
index d5f82263b..05ca43f76 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialog.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/remote/dialogs/ChooseCheckModeDialog.java
@@ -79,7 +79,7 @@ public class ChooseCheckModeDialog extends JFrame {
/**
* actionCombo
*/
- private JComboBox m_actionCombo = new JComboBox();
+ private JComboBox<String> m_actionCombo = new JComboBox<String>();
/**
* middle Panel for content
@@ -89,7 +89,7 @@ public class ChooseCheckModeDialog extends JFrame {
/**
* list of parameter TextFields
*/
- private List m_parameter = new ArrayList();
+ private List<JComponent> m_parameter = new ArrayList<JComponent>();
/**
* values to check
@@ -231,7 +231,7 @@ public class ChooseCheckModeDialog extends JFrame {
Object value = m_checkValues.get(param.getName());
if (param.hasValueSet()) {
- JComboBox combo = new JComboBox();
+ JComboBox<String> combo = new JComboBox<String>();
for (Iterator valueIter = param.valueSetIterator();
valueIter.hasNext();) {
@@ -310,8 +310,8 @@ public class ChooseCheckModeDialog extends JFrame {
* @param l
* List
*/
- public void setActions(List l) {
- Iterator iter = l.iterator();
+ public void setActions(List<String> l) {
+ Iterator<String> iter = l.iterator();
while (iter.hasNext()) {
m_actionCombo.addItem(iter.next());
}
@@ -337,7 +337,7 @@ public class ChooseCheckModeDialog extends JFrame {
*/
public List getParameter() {
Iterator iter = m_parameter.iterator();
- List result = new ArrayList();
+ List<Object> result = new ArrayList<Object>();
while (iter.hasNext()) {
Object component = iter.next();
if (component instanceof JTextField) {
@@ -354,7 +354,7 @@ public class ChooseCheckModeDialog extends JFrame {
*/
public List getTextFields() {
Iterator iter = m_parameter.iterator();
- List result = new ArrayList();
+ List<Object> result = new ArrayList<Object>();
while (iter.hasNext()) {
Object component = iter.next();
if (component instanceof JTextField) {
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 9324bea17..47006d0d6 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
@@ -67,12 +67,12 @@ public class ChooseCheckModeDialogBP {
/**
* a list of actions
*/
- private Map m_actionsObj = new HashMap();
+ private Map<String, Action> m_actionsObj = new HashMap<String, Action>();
/**
* a list of actions
*/
- private List m_actionsNames = new ArrayList();
+ private List<String> m_actionsNames = new ArrayList<String>();
/** ComponentIdentifier of actual component */
private IComponentIdentifier m_compId;
@@ -301,7 +301,7 @@ public class ChooseCheckModeDialogBP {
}
m_actionsObj.clear();
Iterator iter = component.getActions().iterator();
- List names = new LinkedList();
+ List<String> names = new LinkedList<String>();
while (iter.hasNext()) {
Action action = (Action) iter.next();
if (!action.isDeprecated()

Back to the top