Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-02-07 08:52:16 +0000
committerLars Vogel2020-02-11 07:53:27 +0000
commite5856a3a6f6abe4f1b1805c0b2d7fc524c01c638 (patch)
tree1f816da013ad23e7db65901d3612b62dc1bc9340
parent9cb5ad214ffd319600be668211bbf3b7f78d5de8 (diff)
downloadeclipse.platform.ua-e5856a3a6f6abe4f1b1805c0b2d7fc524c01c638.tar.gz
eclipse.platform.ua-e5856a3a6f6abe4f1b1805c0b2d7fc524c01c638.tar.xz
eclipse.platform.ua-e5856a3a6f6abe4f1b1805c0b2d7fc524c01c638.zip
Use map method directly if possibleI20200212-0910I20200211-1800
JDT provides a new cleanup which allows to transform code to call methods directly on map instead of accessing the values or the keys before calling the same method. Saves code which we have to read and might be slightly faster. Change-Id: Ib06a9d72d3e2782be3777cf7cf92d427d312d1eb Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
index 8b5e6731a..5d0fe1cb6 100644
--- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
+++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
@@ -235,7 +235,7 @@ public class WorkingSetData extends RequestData {
Map<String, Set<String>> criteriaMap = new HashMap<>();
CriterionResource[] criteria = ws.getCriteria();
CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
- if(!criteriaMap.keySet().contains(category))
+ if(!criteriaMap.containsKey(category))
return STATE_UNCHECKED;
Set<String> criterionValuesFromWS = criteriaMap.get(category);

Back to the top