summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Hungershausen2018-06-15 04:07:05 -0400
committerJonas Hungershausen2018-06-15 04:09:09 -0400
commit9d72f98f58e0c5fff145461e9a8282f2f6f6c926 (patch)
tree4149c5730963f9cdc02d47a2faf531d27dfcddc5
parentd3f94a16e823f8bf57175e439539192c51c86267 (diff)
downloadeclipse.platform.text-9d72f98f58e0c5fff145461e9a8282f2f6f6c926.zip
eclipse.platform.text-9d72f98f58e0c5fff145461e9a8282f2f6f6c926.tar.gz
eclipse.platform.text-9d72f98f58e0c5fff145461e9a8282f2f6f6c926.tar.xz
[Sonar] Removes redundant null check of variable that can't be nullI20180618-0800I20180615-0655
see https://sonar.eclipse.org/drilldown/issues/33533?rids%5B%5D=175028&rule=findbugs%3ARCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE&rule_sev=CRITICAL&severity=CRITICAL Change-Id: I3b26095baa6f39647104f69d2974c0611171009b Signed-off-by: Jonas Hungershausen <jonas.hungershausen@vogella.com>
-rw-r--r--org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/OrderedExtensionComparator.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/OrderedExtensionComparator.java b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/OrderedExtensionComparator.java
index 9cf3222..84c3d51 100644
--- a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/OrderedExtensionComparator.java
+++ b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/OrderedExtensionComparator.java
@@ -22,7 +22,7 @@ import org.eclipse.ui.internal.genericeditor.hover.TextHoverRegistry.TextHoverEx
/**
* A comparator that allows to sort elements according to their relative
* placement (isBefore and isAfter)
- *TODO: generalizing to any kind of extension supporting isBefore and isAfter
+ * TODO: generalizing to any kind of extension supporting isBefore and isAfter
*/
class OrderedExtensionComparator implements Comparator<TextHoverExtension> {
@@ -53,9 +53,6 @@ class OrderedExtensionComparator implements Comparator<TextHoverExtension> {
return true;
}
String id1 = arg1.getId();
- if (id1 == null) {
- return false;
- }
if (before0.equals(id1)) {
return true;
}
@@ -75,9 +72,6 @@ class OrderedExtensionComparator implements Comparator<TextHoverExtension> {
return true;
}
String id1 = arg1.getId();
- if (id1 == null) {
- return false;
- }
if (after0.equals(id1)) {
return true;
}