diff options
author | Thanh Ha | 2014-12-21 04:04:27 +0000 |
---|---|---|
committer | vrubezhny | 2015-01-17 02:33:01 +0000 |
commit | f120b58826eaaab9ebff1b63b20bb30b01a15b89 (patch) | |
tree | 14bdc92176df39f856009cc42de755bc884ac633 | |
parent | ea0ac8c564ccc654fe0797d220b17d32af8014c7 (diff) | |
download | webtools.jsdt-f120b58826eaaab9ebff1b63b20bb30b01a15b89.tar.gz webtools.jsdt-f120b58826eaaab9ebff1b63b20bb30b01a15b89.tar.xz webtools.jsdt-f120b58826eaaab9ebff1b63b20bb30b01a15b89.zip |
Bug 455878 - Fix Sonar if-statements must use braces in debug.rhino
Change-Id: I047c2dafdecad515d57fb8f8764d3a9dc7341e7c
Signed-off-by: Thanh Ha <thanh.ha@alumni.carleton.ca>
2 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ScriptReferenceImpl.java b/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ScriptReferenceImpl.java index ffb4be0f1..9538e9797 100644 --- a/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ScriptReferenceImpl.java +++ b/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/ScriptReferenceImpl.java @@ -95,8 +95,9 @@ public class ScriptReferenceImpl extends MirrorImpl implements ScriptReference { public Location functionLocation(String functionName) { for (Iterator iterator = functionLocations.iterator(); iterator.hasNext();) { Location location = (Location) iterator.next(); - if (location.functionName().equals(functionName)) + if (location.functionName().equals(functionName)) { return location; + } } return null; } @@ -107,8 +108,9 @@ public class ScriptReferenceImpl extends MirrorImpl implements ScriptReference { public Location lineLocation(int lineNumber) { for (Iterator iterator = lineLocations.iterator(); iterator.hasNext();) { Location location = (Location) iterator.next(); - if (location.lineNumber() == lineNumber) + if (location.lineNumber() == lineNumber) { return location; + } } return null; } diff --git a/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StackFrameImpl.java b/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StackFrameImpl.java index 14d438327..83774cb32 100644 --- a/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StackFrameImpl.java +++ b/bundles/org.eclipse.wst.jsdt.debug.rhino/src/org/eclipse/wst/jsdt/debug/internal/rhino/jsdi/StackFrameImpl.java @@ -210,10 +210,12 @@ public class StackFrameImpl extends MirrorImpl implements StackFrame { String name = (String) property.get(JSONConstants.NAME); Number ref = (Number) property.get(JSONConstants.REF); VariableImpl variable = new VariableImpl(vm, this, name, ref); - if (name.equals(JSONConstants.THIS)) + if (name.equals(JSONConstants.THIS)) { thisVariable = variable; - else + } + else { variables.add(variable); + } } } } catch (DisconnectedException e) { |