Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/notify/impl/BasicNotifierImpl.java2
-rw-r--r--plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java6
-rw-r--r--plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java6
-rw-r--r--plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/EcoreAnnotationValidator.java2
-rw-r--r--plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java2
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 ++) {

Back to the top