Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-10-08 12:32:10 +0000
committerUwe Stieber2012-10-08 12:32:10 +0000
commitd1215fb8269901553ccf51bf4c0bc10be31eb61b (patch)
treef2155d92b2fea6479ffab3773fc24a14477ebc32 /target_explorer
parent7cf0ef31b051a66890266205e84b7d71e673063f (diff)
downloadorg.eclipse.tcf-d1215fb8269901553ccf51bf4c0bc10be31eb61b.tar.gz
org.eclipse.tcf-d1215fb8269901553ccf51bf4c0bc10be31eb61b.tar.xz
org.eclipse.tcf-d1215fb8269901553ccf51bf4c0bc10be31eb61b.zip
Target Explorer: Fix some findbugs warnings
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java
index 3c60fe4d3..137ad83cb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/LocatorModel.java
@@ -366,7 +366,7 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
- CoreBundleActivator.getTraceHandler().trace("LocatorModel.validatePeer( " + (peer != null ? peer.getID() : null) + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
+ CoreBundleActivator.getTraceHandler().trace("LocatorModel.validatePeer( " + peer.getID() + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
}
IPeer result = peer;
@@ -399,16 +399,17 @@ public class LocatorModel extends PlatformObject implements ILocatorModel {
Assert.isNotNull(node);
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
+ // Get the peer from the peer node
+ IPeer peer = node.getPeer();
+ if (peer == null) return node;
+
// Skip static peer IP address validation
- String value = node.getPeer().getAttributes().get("static.transient"); //$NON-NLS-1$
+ String value = peer.getAttributes().get("static.transient"); //$NON-NLS-1$
boolean isStatic = value != null && Boolean.parseBoolean(value.trim());
if (isStatic) return node;
- // Get the peer from the peer node
- IPeer peer = node.getPeer();
-
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITracing.ID_TRACE_LOCATOR_MODEL)) {
- CoreBundleActivator.getTraceHandler().trace("LocatorModel.validatePeerNodeForAdd( " + (peer != null ? peer.getID() : null) + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
+ CoreBundleActivator.getTraceHandler().trace("LocatorModel.validatePeerNodeForAdd( " + peer.getID() + " )", ITracing.ID_TRACE_LOCATOR_MODEL, this); //$NON-NLS-1$ //$NON-NLS-2$
}
IPeerModel result = node;

Back to the top