summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Hungershausen2018-06-09 09:58:00 -0400
committerLars Vogel2018-06-11 06:21:07 -0400
commit63b908f4c76920c70ba8fe42f78327e0e8c0362d (patch)
tree206584cdf3d23664164513bb89426be85ece6e4c
parent44753c53be84545a2e1206412bb54dd2f2638075 (diff)
downloadeclipse.platform.text-63b908f4c76920c70ba8fe42f78327e0e8c0362d.zip
eclipse.platform.text-63b908f4c76920c70ba8fe42f78327e0e8c0362d.tar.gz
eclipse.platform.text-63b908f4c76920c70ba8fe42f78327e0e8c0362d.tar.xz
[Sonar] Removes dead store to widgetLineI20180613-0440I20180613-0300
see https://sonar.eclipse.org/drilldown/issues/33533?rids%5B%5D=33541&rids%5B%5D=45869&rule=findbugs%3ADLS_DEAD_LOCAL_STORE&rule_sev=CRITICAL&severity=CRITICAL and https://sonar.eclipse.org/drilldown/issues/33533?rids%5B%5D=33541&rids%5B%5D=45869&rule=findbugs%3ADLS_DEAD_LOCAL_STORE&rule_sev=CRITICAL&severity=CRITICAL Change-Id: I6010a45fe5ffa6efc94016cef6be57fc2ea8460a Signed-off-by: Jonas Hungershausen <jonas.hungershausen@vogella.com>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/CompositeRuler.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/CompositeRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/CompositeRuler.java
index d864a8a..eea1921 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/CompositeRuler.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/CompositeRuler.java
@@ -728,7 +728,7 @@ public class CompositeRuler implements IVerticalRuler, IVerticalRulerExtension,
try {
IRegion r= viewer.getVisibleRegion();
IDocument d= viewer.getDocument();
- return widgetLine += d.getLineOfOffset(r.getOffset());
+ return widgetLine + d.getLineOfOffset(r.getOffset());
} catch (BadLocationException x) {
}
return widgetLine;
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
index 311f411..958b71c 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
@@ -551,7 +551,7 @@ public final class VerticalRuler implements IVerticalRuler, IVerticalRulerExtens
try {
IRegion r= viewer.getVisibleRegion();
IDocument d= viewer.getDocument();
- return widgetLine += d.getLineOfOffset(r.getOffset());
+ return widgetLine + d.getLineOfOffset(r.getOffset());
} catch (BadLocationException x) {
}
return widgetLine;