diff options
author | Carsten Hammer | 2019-05-24 15:37:53 +0000 |
---|---|---|
committer | Ed Merks | 2019-05-28 08:45:46 +0000 |
commit | 063937d66a94e688eaa530b0ee8a8c751f2bb362 (patch) | |
tree | 53b319f25f3025ea47a4311cfa4599e9b270be74 | |
parent | df005ec515e92c0232fa918eb6cbe5218e1cf790 (diff) | |
download | org.eclipse.emf-063937d66a94e688eaa530b0ee8a8c751f2bb362.tar.gz org.eclipse.emf-063937d66a94e688eaa530b0ee8a8c751f2bb362.tar.xz org.eclipse.emf-063937d66a94e688eaa530b0ee8a8c751f2bb362.zip |
Change-Id: I1c9f644ecabe281fb62f09ce3e064ec9d685de56
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
5 files changed, 9 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/notify/impl/BasicNotifierImpl.java b/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/notify/impl/BasicNotifierImpl.java index ba3ae3968..c289250aa 100644 --- a/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/notify/impl/BasicNotifierImpl.java +++ b/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/notify/impl/BasicNotifierImpl.java @@ -392,7 +392,7 @@ public class BasicNotifierImpl implements Notifier protected boolean eBasicHasAdapters() { BasicEList<Adapter> eBasicAdapters = eBasicAdapters(); - return eBasicAdapters != null && eBasicAdapters.size() != 0; + return eBasicAdapters != null && !eBasicAdapters.isEmpty(); } /* diff --git a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java index 73d465d4c..9844cfa5b 100644 --- a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java +++ b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java @@ -1337,7 +1337,7 @@ public class BasicFeatureMap public boolean addAll(int index, EStructuralFeature feature, Collection<?> collection) { - if (collection.size() == 0) + if (collection.isEmpty()) { return false; } @@ -1414,7 +1414,7 @@ public class BasicFeatureMap public boolean addAll(EStructuralFeature feature, Collection<?> collection) { - if (collection.size() == 0) + if (collection.isEmpty()) { return false; } @@ -1488,7 +1488,7 @@ public class BasicFeatureMap public boolean addAll(EStructuralFeature feature, int index, Collection<?> collection) { - if (collection.size() == 0) + if (collection.isEmpty()) { return false; } diff --git a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java index 71aa23a3b..f7211f65e 100644 --- a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java +++ b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java @@ -1290,7 +1290,7 @@ public abstract class DelegatingFeatureMap extends DelegatingEcoreEList<FeatureM public boolean addAll(int index, EStructuralFeature feature, Collection<?> collection) { - if (collection.size() == 0) + if (collection.isEmpty()) { return false; } @@ -1364,7 +1364,7 @@ public abstract class DelegatingFeatureMap extends DelegatingEcoreEList<FeatureM public boolean addAll(EStructuralFeature feature, Collection<?> collection) { - if (collection.size() == 0) + if (collection.isEmpty()) { return false; } @@ -1434,7 +1434,7 @@ public abstract class DelegatingFeatureMap extends DelegatingEcoreEList<FeatureM public boolean addAll(EStructuralFeature feature, int index, Collection<?> collection) { - if (collection.size() == 0) + if (collection.isEmpty()) { return false; } diff --git a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/EcoreAnnotationValidator.java b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/EcoreAnnotationValidator.java index 2369df5fd..fce5637fa 100644 --- a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/EcoreAnnotationValidator.java +++ b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/EcoreAnnotationValidator.java @@ -156,7 +156,7 @@ public final class EcoreAnnotationValidator extends BasicEAnnotationValidator result.add(eClass); } }.doSwitch(eModelElement); - return result.size() == 0 ? Collections.<EClass> emptyList() : Collections.singletonList(result.get(0)); + return result.isEmpty() ? Collections.<EClass> emptyList() : Collections.singletonList(result.get(0)); } @Override diff --git a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java index de996be4d..85c137300 100644 --- a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java +++ b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java @@ -6726,7 +6726,7 @@ static class Token implements java.io.Serializable { private static final int NONBMP_BLOCK_START = 84; static protected RangeToken getRange(String name, boolean positive) { - if (Token.categories.size() == 0) { + if (Token.categories.isEmpty()) { synchronized (Token.categories) { Token[] ranges = new Token[Token.categoryNames.length]; for (int i = 0; i < ranges.length; i ++) { |