diff options
author | Carsten Hammer | 2020-11-01 11:11:11 +0000 |
---|---|---|
committer | Thomas Watson | 2020-11-02 20:42:33 +0000 |
commit | 81e121f6977a6b9521f3475a2141d79ce8b4eeaa (patch) | |
tree | 129f8ef716b236151c2eb549d9abc09b017d8549 | |
parent | a9d8798a81eef1f69502f27031476e6fb0815d35 (diff) | |
download | rt.equinox.bundles-81e121f6977a6b9521f3475a2141d79ce8b4eeaa.tar.gz rt.equinox.bundles-81e121f6977a6b9521f3475a2141d79ce8b4eeaa.tar.xz rt.equinox.bundles-81e121f6977a6b9521f3475a2141d79ce8b4eeaa.zip |
Bug: Useless condition: it's known that path.length() != 0 at this point
This condition always produces the same result as the value of the
involved variable that was narrowed before. Probably something else was
meant or the condition can be removed.
Rank: Troubling (14), confidence: High
Pattern: UC_USELESS_CONDITION
Type: UC, Category: STYLE (Dodgy code)
Change-Id: Ied6f3b35e3d7ffc26bba5a0768a48417a8727f42
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r-- | bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java index a9a125fc3..a5eb8ad08 100644 --- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java +++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java @@ -1154,7 +1154,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope { if (path == null) return EMPTY_STRING; if (path.length() > 0 && path.charAt(0) == IPath.SEPARATOR) - result = path.length() == 0 ? EMPTY_STRING : path.substring(1); + result = path.substring(1); return result; } |