Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-05-25 09:17:14 +0000
committerUwe Stieber2012-05-25 09:17:14 +0000
commitc43ff2700cbc527f99e29eefe83f4586a4c2258e (patch)
tree483a85c908377cb05776c68fc06de57bb7f88e85 /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src
parentcd822fb9e1041dbd02071a04b2b7963ac98be248 (diff)
downloadorg.eclipse.tcf-c43ff2700cbc527f99e29eefe83f4586a4c2258e.tar.gz
org.eclipse.tcf-c43ff2700cbc527f99e29eefe83f4586a4c2258e.tar.xz
org.eclipse.tcf-c43ff2700cbc527f99e29eefe83f4586a4c2258e.zip
Target Explorer: Fix more findbugs warnings
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java
index b4c0c66e6..c4d796d8d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java
@@ -221,14 +221,19 @@ public class RemoteAppLaunchManagerDelegate extends DefaultLaunchManagerDelegate
public void validate(String launchMode, ILaunchConfiguration launchConfig) throws LaunchServiceException {
super.validate(launchMode, launchConfig);
- String missingAttributes = null;
+ StringBuilder missingAttributes = new StringBuilder();
for (String attribute : MANDATORY_CONFIG_ATTRIBUTES) {
if (!isValidAttribute(attribute, launchConfig, launchMode)) {
- missingAttributes = (missingAttributes == null) ? attribute : missingAttributes + ", " + attribute; //$NON-NLS-1$
+ if (missingAttributes.length() == 0) {
+ missingAttributes.append(attribute);
+ } else {
+ missingAttributes.append(", "); //$NON-NLS-1$
+ missingAttributes.append(attribute);
+ }
}
}
- if (missingAttributes != null) {
- throw new LaunchServiceException("Missing launch configuration attributes: " + '\n' + missingAttributes, LaunchServiceException.TYPE_MISSING_LAUNCH_CONFIG_ATTR); //$NON-NLS-1$
+ if (missingAttributes.length() > 0) {
+ throw new LaunchServiceException("Missing launch configuration attributes: " + '\n' + missingAttributes.toString(), LaunchServiceException.TYPE_MISSING_LAUNCH_CONFIG_ATTR); //$NON-NLS-1$
}
}

Back to the top