Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2012-04-09 15:31:31 -0400
committerkmoore2012-04-09 15:31:31 -0400
commit7f6aa90ca10ee259c27a8b47b9115c47adf80593 (patch)
tree8763e6bf6fadb82de64a11b518ee919dda0f7b06
parent17dd97a13ab8ab0f8e1e3d8a9f24eb5b0efe9fbb (diff)
downloadwebtools.dali-7f6aa90ca10ee259c27a8b47b9115c47adf80593.tar.gz
webtools.dali-7f6aa90ca10ee259c27a8b47b9115c47adf80593.tar.xz
webtools.dali-7f6aa90ca10ee259c27a8b47b9115c47adf80593.zip
removed unnecessary legacy CollectionTools.collection(Iterable) calls
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java4
5 files changed, 8 insertions, 10 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
index 0bb739537c..e53a0c0279 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,7 +14,6 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.NotNullFilter;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
@@ -201,7 +200,7 @@ public abstract class AbstractJavaTypeMapping<A extends Annotation>
}
public Iterable<AttributeMapping> getAllAttributeMappings(final String mappingKey) {
- return new FilteringIterable<AttributeMapping>(CollectionTools.collection(this.getAllAttributeMappings())) {
+ return new FilteringIterable<AttributeMapping>(this.getAllAttributeMappings()) {
@Override
protected boolean accept(AttributeMapping attributeMapping) {
return Tools.valuesAreEqual(attributeMapping.getKey(), mappingKey);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java
index 6eb6425cd6..8ad13d9f53 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmAttributeMapping.java
@@ -14,7 +14,6 @@ import java.util.List;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.common.utility.internal.Transformer;
@@ -532,7 +531,7 @@ public abstract class AbstractOrmAttributeMapping<X extends XmlAttributeMapping>
// thus using the attribute of the corresponding Java persistent type instead
private Iterable<String> getCandidateMappingNames() {
JavaPersistentType jpt = this.getTypeMapping().getPersistentType().getJavaPersistentType();
- return jpt == null ? EmptyIterable.<String>instance() : CollectionTools.collection(jpt.getAttributeNames());
+ return jpt == null ? EmptyIterable.<String>instance() : jpt.getAttributeNames();
}
private boolean attributeNameTouches(int pos) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
index a01439d3a3..0bfcebae83 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
@@ -544,7 +544,7 @@ public abstract class AbstractPrimaryKeyValidator
* mapping with transient attribute mappings being excluded
*/
protected Iterable<AttributeMapping> getAttributeMappings(TypeMapping typeMapping) {
- return new FilteringIterable<AttributeMapping>(CollectionTools.collection(typeMapping.getAllAttributeMappings())) {
+ return new FilteringIterable<AttributeMapping>(typeMapping.getAllAttributeMappings()) {
@Override
protected boolean accept(AttributeMapping o) {
return !StringTools.stringsAreEqual(o.getKey(), MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
index 114f3fe731..6ba8363949 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
@@ -176,7 +176,7 @@ public class GenericJavaMapsIdDerivedIdentityStrategy2_0
}
protected Iterable<AttributeMapping> getAllAttributeMappings() {
- return CollectionTools.collection(this.getPersistentAttribute().getOwningTypeMapping().getAllAttributeMappings());
+ return this.getPersistentAttribute().getOwningTypeMapping().getAllAttributeMappings();
}
public Iterable<String> getSortedCandidateIdAttributeNames() {
@@ -228,7 +228,7 @@ public class GenericJavaMapsIdDerivedIdentityStrategy2_0
}
return new CompositeIterable<AttributeMapping>(
mapping,
- CollectionTools.collection(embeddable.getAllAttributeMappings())
+ embeddable.getAllAttributeMappings()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java
index 6432e46e11..bced510416 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java
@@ -116,7 +116,7 @@ public class GenericOrmMapsIdDerivedIdentityStrategy2_0
}
protected Iterable<AttributeMapping> getAllAttributeMappings() {
- return CollectionTools.collection(this.getPersistentAttribute().getOwningTypeMapping().getAllAttributeMappings());
+ return this.getPersistentAttribute().getOwningTypeMapping().getAllAttributeMappings();
}
public Iterable<String> getSortedCandidateIdAttributeNames() {
@@ -168,7 +168,7 @@ public class GenericOrmMapsIdDerivedIdentityStrategy2_0
}
return new CompositeIterable<AttributeMapping>(
mapping,
- CollectionTools.collection(embeddable.getAllAttributeMappings())
+ embeddable.getAllAttributeMappings()
);
}
};

Back to the top