Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-11-04 03:57:22 -0500
committerUwe Stieber2013-11-04 03:57:22 -0500
commit7e17bdd2f6e30fb59b204312e2a7ebd3d8f6a27c (patch)
tree77724fd94e5e143ed4f6d5438f6d538548a89d36 /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core
parentff253d796de13c77029a568c0cf0a21f8d145b36 (diff)
downloadorg.eclipse.tcf-7e17bdd2f6e30fb59b204312e2a7ebd3d8f6a27c.tar.gz
org.eclipse.tcf-7e17bdd2f6e30fb59b204312e2a7ebd3d8f6a27c.tar.xz
org.eclipse.tcf-7e17bdd2f6e30fb59b204312e2a7ebd3d8f6a27c.zip
Target Explorer: Fix findbugs warnings
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
index 423ed62a5..353ff01ed 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
@@ -59,13 +59,14 @@ public class PathMapService extends AbstractService implements IPathMapService {
Assert.isTrue(!Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
Assert.isNotNull(context);
- // Acquire the lock before accessing the path mappings
- lock.lock();
-
PathMapRule[] rules = null;
- List<PathMapRule> rulesList = new ArrayList<PathMapRule>();
try {
+ // Acquire the lock before accessing the path mappings
+ lock.lock();
+
+ List<PathMapRule> rulesList = new ArrayList<PathMapRule>();
+
// Get the launch configuration for that peer model
ILaunchConfiguration config = (ILaunchConfiguration) Platform.getAdapterManager().getAdapter(context, ILaunchConfiguration.class);
if (config == null) {
@@ -114,13 +115,14 @@ public class PathMapService extends AbstractService implements IPathMapService {
Assert.isNotNull(source);
Assert.isNotNull(destination);
- // Acquire the lock before accessing the path mappings
- lock.lock();
-
PathMapRule rule = null;
- List<PathMapRule> rulesList = new ArrayList<PathMapRule>();
try {
+ // Acquire the lock before accessing the path mappings
+ lock.lock();
+
+ List<PathMapRule> rulesList = new ArrayList<PathMapRule>();
+
// Get the launch configuration for that peer model
ILaunchConfigurationWorkingCopy config = (ILaunchConfigurationWorkingCopy) Platform.getAdapterManager().getAdapter(context, ILaunchConfigurationWorkingCopy.class);
if (config == null) {
@@ -177,12 +179,12 @@ public class PathMapService extends AbstractService implements IPathMapService {
Assert.isNotNull(context);
Assert.isNotNull(rule);
- // Acquire the lock before accessing the path mappings
- lock.lock();
+ try {
+ // Acquire the lock before accessing the path mappings
+ lock.lock();
- List<PathMapRule> rulesList = new ArrayList<PathMapRule>();
+ List<PathMapRule> rulesList = new ArrayList<PathMapRule>();
- try {
// Get the launch configuration for that peer model
ILaunchConfigurationWorkingCopy config = (ILaunchConfigurationWorkingCopy) Platform.getAdapterManager().getAdapter(context, ILaunchConfigurationWorkingCopy.class);
if (config == null) {

Back to the top