diff options
author | Brian Vosburgh | 2015-09-23 22:29:57 +0000 |
---|---|---|
committer | Brian Vosburgh | 2015-09-23 22:29:57 +0000 |
commit | 1d62c97e1dada43ee9a58bbc48f540ee34e8a51d (patch) | |
tree | 71387cf45073d7d4d65b10c53f43a4e9b71ef2ca /jpa | |
parent | aaaf2bd5bb576ee318328eab417f32bad0a68b67 (diff) | |
download | webtools.dali-1d62c97e1dada43ee9a58bbc48f540ee34e8a51d.tar.gz webtools.dali-1d62c97e1dada43ee9a58bbc48f540ee34e8a51d.tar.xz webtools.dali-1d62c97e1dada43ee9a58bbc48f540ee34e8a51d.zip |
major rework of collections, stacks, queues, and deques
Diffstat (limited to 'jpa')
37 files changed, 106 insertions, 106 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextModel.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextModel.java index 5260660fc9..4bdbb2261a 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextModel.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextModel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -461,7 +461,7 @@ public abstract class AbstractJpaContextModel<P extends JpaContextModel> */ protected void sync(boolean sync) { @SuppressWarnings("unchecked") - HashSet<C> contextElements = (HashSet<C>) CollectionTools.set(this.elements.toArray()); + HashSet<C> contextElements = (HashSet<C>) CollectionTools.hashSet(this.elements.toArray()); ArrayList<C> contextElementsToSync = new ArrayList<C>(contextElements.size()); int resourceIndex = 0; diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java index 747df14296..7604c53d18 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/ContextContainerTools.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Oracle. All rights reserved. + * Copyright (c) 2010, 2015 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. @@ -94,7 +94,7 @@ public class ContextContainerTools { * <em>updated</em> (<code>false</code>). */ protected static <C extends JpaContextModel, R> void sync(Adapter<C, R> adapter, boolean sync) { - HashSet<C> contextElements = CollectionTools.set(adapter.getContextElements()); + HashSet<C> contextElements = CollectionTools.hashSet(adapter.getContextElements()); ArrayList<C> contextElementsToSync = new ArrayList<C>(contextElements.size()); int resourceIndex = 0; diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java index be06988900..ff0de464d5 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/MappingTools.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2013 Oracle. All rights reserved. + * Copyright (c) 2006, 2015 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. @@ -535,7 +535,7 @@ public final class MappingTools { * Returns the names of basic array types. */ public static Iterable<String> getBasicArrayTypeNames() { - return ListTools.list(BASIC_ARRAY_TYPE_NAMES); + return ListTools.arrayList(BASIC_ARRAY_TYPE_NAMES); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java index 9761487596..ee47c331c5 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2013 Oracle. All rights reserved. + * Copyright (c) 2006, 2015 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. @@ -445,7 +445,7 @@ public abstract class AbstractJavaPersistentType private void intializePropertyAccessAttributes() { this.initializeFieldAttributes(JavaResourceAnnotatedElement.IS_ANNOTATED); - Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods()); + Collection<JavaResourceMethod> resourceMethods = CollectionTools.hashBag(this.getResourceMethods()); //iterate through all resource methods searching for persistable getters for (JavaResourceMethod getterMethod : this.getResourcePropertyGetters()) { JavaResourceMethod setterMethod = JavaResourceMethod.SET_METHOD_TRANSFORMER.transform(getterMethod); @@ -459,7 +459,7 @@ public abstract class AbstractJavaPersistentType } private void initializeAnnotatedPropertyAttributes() { - Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods()); + Collection<JavaResourceMethod> resourceMethods = CollectionTools.hashBag(this.getResourceMethods()); //iterate through all resource methods searching for persistable getters for (JavaResourceMethod getterMethod : this.getResourcePropertyGetters()) { JavaResourceMethod setterMethod = JavaResourceMethod.SET_METHOD_TRANSFORMER.transform(getterMethod); @@ -503,7 +503,7 @@ public abstract class AbstractJavaPersistentType * 2. all annotated methods(getters/setters) */ private void syncFieldAccessAttributes() { - HashSet<JavaSpecifiedPersistentAttribute> contextAttributes = CollectionTools.set(this.getAttributes()); + HashSet<JavaSpecifiedPersistentAttribute> contextAttributes = CollectionTools.hashSet(this.getAttributes()); this.syncFieldAttributes(contextAttributes, JavaResourceField.IS_RELEVANT_FOR_FIELD_ACCESS); this.syncAnnotatedPropertyAttributes(contextAttributes); @@ -516,11 +516,11 @@ public abstract class AbstractJavaPersistentType * 3. all annotated methods getters/setters that don't have a matching pair */ private void syncPropertyAccessAttributes() { - HashSet<JavaSpecifiedPersistentAttribute> contextAttributes = CollectionTools.set(this.getAttributes()); + HashSet<JavaSpecifiedPersistentAttribute> contextAttributes = CollectionTools.hashSet(this.getAttributes()); this.syncFieldAttributes(contextAttributes, JavaResourceAnnotatedElement.IS_ANNOTATED); - Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods()); + Collection<JavaResourceMethod> resourceMethods = CollectionTools.hashBag(this.getResourceMethods()); //iterate through all resource methods searching for persistable getters for (JavaResourceMethod getterMethod : this.getResourcePropertyGetters()) { JavaResourceMethod setterMethod = JavaResourceMethod.SET_METHOD_TRANSFORMER.transform(getterMethod); @@ -546,7 +546,7 @@ public abstract class AbstractJavaPersistentType } private void syncAnnotatedPropertyAttributes(HashSet<JavaSpecifiedPersistentAttribute> contextAttributes) { - Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getResourceMethods()); + Collection<JavaResourceMethod> resourceMethods = CollectionTools.hashBag(this.getResourceMethods()); //iterate through all resource methods searching for persistable getters for (JavaResourceMethod getterMethod : this.getResourcePropertyGetters()) { JavaResourceMethod setterMethod = JavaResourceMethod.SET_METHOD_TRANSFORMER.transform(getterMethod); diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java index 8563422280..60d7de60a6 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -199,8 +199,8 @@ public abstract class AbstractJavaQuery<P extends JavaQueryContainer, A extends protected boolean hintsAreEquivalentTo(Query other) { // get fixed lists of the hints - ArrayList<JavaQueryHint> hints1 = ListTools.list(this.getHints()); - ArrayList<? extends QueryHint> hints2 = ListTools.list(other.getHints()); + ArrayList<JavaQueryHint> hints1 = ListTools.arrayList(this.getHints()); + ArrayList<? extends QueryHint> hints2 = ListTools.arrayList(other.getHints()); if (hints1.size() != hints2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java index 6c0cbb7e2b..99b1f545d7 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmQuery.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -219,8 +219,8 @@ public abstract class AbstractOrmQuery<X extends XmlQuery> protected boolean hintsAreEquivalentTo(Query other) { // get fixed lists of the hints - ArrayList<OrmQueryHint> hints1 = ListTools.list(this.getHints()); - ArrayList<? extends QueryHint> hints2 = ListTools.list(other.getHints()); + ArrayList<OrmQueryHint> hints1 = ListTools.arrayList(this.getHints()); + ArrayList<? extends QueryHint> hints2 = ListTools.arrayList(other.getHints()); if (hints1.size() != hints2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java index 363f4e14a6..ed3c32f4cb 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2013 Oracle. All rights reserved. + * Copyright (c) 2006, 2015 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. @@ -619,7 +619,7 @@ public abstract class SpecifiedOrmPersistentType * </ol> */ private void syncFieldAccessDefaultAttributes() { - HashSet<OrmPersistentAttribute> contextAttributes = CollectionTools.set(this.getDefaultAttributes()); + HashSet<OrmPersistentAttribute> contextAttributes = CollectionTools.hashSet(this.getDefaultAttributes()); this.syncFieldDefaultAttributes(contextAttributes, this.buildResourceFieldIsRelevant()); if ( ! this.mapping.isMetadataComplete()) { @@ -640,13 +640,13 @@ public abstract class SpecifiedOrmPersistentType * </ol> */ private void syncPropertyAccessDefaultAttributes() { - HashSet<OrmPersistentAttribute> contextAttributes = CollectionTools.set(this.getDefaultAttributes()); + HashSet<OrmPersistentAttribute> contextAttributes = CollectionTools.hashSet(this.getDefaultAttributes()); if ( ! this.mapping.isMetadataComplete()) { this.syncFieldDefaultAttributes(contextAttributes, JavaResourceAnnotatedElement.IS_ANNOTATED); } - Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getJavaResourceMethods()); + Collection<JavaResourceMethod> resourceMethods = CollectionTools.hashBag(this.getJavaResourceMethods()); //iterate through all resource methods searching for persistable getters for (JavaResourceMethod getterMethod : this.getJavaResourcePropertyGetters()) { JavaResourceMethod setterMethod = JavaResourceMethod.SET_METHOD_TRANSFORMER.transform(getterMethod); @@ -688,7 +688,7 @@ public abstract class SpecifiedOrmPersistentType } private void syncAnnotatedPropertyDefaultAttributes(HashSet<OrmPersistentAttribute> contextAttributes) { - Collection<JavaResourceMethod> resourceMethods = CollectionTools.collection(this.getJavaResourceMethods()); + Collection<JavaResourceMethod> resourceMethods = CollectionTools.hashBag(this.getJavaResourceMethods()); //iterate through all resource methods searching for persistable getters for (JavaResourceMethod getterMethod : this.getJavaResourcePropertyGetters()) { JavaResourceMethod setterMethod = JavaResourceMethod.SET_METHOD_TRANSFORMER.transform(getterMethod); diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java index 714e21936f..bec46f3395 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -1564,7 +1564,7 @@ public abstract class AbstractPersistenceUnit } public Iterable<String> getUniqueGeneratorNames() { - return CollectionTools.set(this.getNonEmptyGeneratorNames(), this.getGeneratorsSize()); + return CollectionTools.hashSet(this.getNonEmptyGeneratorNames(), this.getGeneratorsSize()); } protected Iterable<String> getNonEmptyGeneratorNames() { @@ -1584,7 +1584,7 @@ public abstract class AbstractPersistenceUnit * @see #buildQueries() */ protected Iterable<Generator> buildGenerators() { - ArrayList<Generator> result = ListTools.list(this.getMappingFileGenerators()); + ArrayList<Generator> result = ListTools.arrayList(this.getMappingFileGenerators()); HashSet<String> mappingFileGeneratorNames = this.convertToNames(result); HashMap<String, ArrayList<Generator>> allJavaGenerators = this.mapByName(this.getAllJavaGenerators()); @@ -1664,7 +1664,7 @@ public abstract class AbstractPersistenceUnit * or multiple, non-overridden Java queries with the same name. */ protected Iterable<Query> buildQueries() { - ArrayList<Query> result = ListTools.list(this.getMappingFileQueries()); + ArrayList<Query> result = ListTools.arrayList(this.getMappingFileQueries()); HashSet<String> mappingFileQueryNames = this.convertToNames(result); HashMap<String, ArrayList<Query>> allJavaQueries = this.mapByName(this.getAllJavaQueries()); @@ -1984,7 +1984,7 @@ public abstract class AbstractPersistenceUnit * type mappings (by full qualified class name). */ protected Iterable<TypeMapping> getActiveTypeMappings(){ - ArrayList<TypeMapping> result = ListTools.list(this.getMappingFileTypeMappings()); + ArrayList<TypeMapping> result = ListTools.arrayList(this.getMappingFileTypeMappings()); HashSet<String> mappingFileClassNames = this.convertToClassNames(result); HashMap<String, ArrayList<TypeMapping>> javaTypeMappings = this.mapTypeMappingsByClassName(this.getJavaTypeMappings()); @@ -2047,7 +2047,7 @@ public abstract class AbstractPersistenceUnit SubMonitor sm = SubMonitor.convert(monitor, 4); // gather up all the annotated Java types and types listed in the mapping files - HashSet<JavaResourceAbstractType> newClasses = CollectionTools.set(this.getJpaProject().getPotentialJavaSourceTypes()); + HashSet<JavaResourceAbstractType> newClasses = CollectionTools.hashSet(this.getJpaProject().getPotentialJavaSourceTypes()); HashSet<String> mappingFileTypeNames = this.getMappingFileTypeNames(); // calculate the class refs to be removed @@ -2245,7 +2245,7 @@ public abstract class AbstractPersistenceUnit protected <M extends JpaNamedContextModel> ArrayList<M> extractConvertibleJavaModels(Iterable<M> allJavaModels, Iterable<M> mappingFileModels) { ArrayList<M> convertibleModels = new ArrayList<M>(); - HashSet<String> mappingFileModelNames = this.convertToNames(ListTools.list(mappingFileModels)); + HashSet<String> mappingFileModelNames = this.convertToNames(ListTools.arrayList(mappingFileModels)); HashMap<String, ArrayList<M>> allJavaModelsByName = this.mapByName(allJavaModels); for (Map.Entry<String, ArrayList<M>> entry : allJavaModelsByName.entrySet()) { String javaModelName = entry.getKey(); @@ -2300,7 +2300,7 @@ public abstract class AbstractPersistenceUnit } protected void checkForMultiplePersistenceUnitMetadata(List<IMessage> messages) { - ArrayList<MappingFileRef> pumdMappingFileRefs = ListTools.list(this.getPersistenceUnitMetadataMappingFileRefs()); + ArrayList<MappingFileRef> pumdMappingFileRefs = ListTools.arrayList(this.getPersistenceUnitMetadataMappingFileRefs()); if (pumdMappingFileRefs.size() > 1) { for (MappingFileRef mappingFileRef : pumdMappingFileRefs) { messages.add( diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java index 03788c2111..4c71c2c47b 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2013 Oracle. All rights reserved. + * Copyright (c) 2009, 2015 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. @@ -481,7 +481,7 @@ public abstract class JpaFacetDataModelProvider * put a null entry at the top of the list (for <none>) */ protected List<String> buildValidConnectionNames() { - List<String> connectionNames = ListTools.sort(ListTools.list(this.getConnectionProfileNames())); + List<String> connectionNames = ListTools.sort(ListTools.arrayList(this.getConnectionProfileNames())); connectionNames.add(0, null); return connectionNames; } @@ -518,7 +518,7 @@ public abstract class JpaFacetDataModelProvider * put an entry for the default at the top of the list */ protected List<String> buildValidStrings(Iterable<String> strings, String defaultString) { - List<String> validStrings = ListTools.list(strings); + List<String> validStrings = ListTools.arrayList(strings); if ((defaultString != null) && ! validStrings.contains(defaultString)) { validStrings.add(0, defaultString); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericContextRoot.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericContextRoot.java index c681173e15..26a6320d0e 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericContextRoot.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericContextRoot.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -277,7 +277,7 @@ public class GenericContextRoot } PersistenceUnit persistenceUnit = persistence.getPersistenceUnits().iterator().next(); - HashBag<JavaResourceAbstractType> annotatedTypes = CollectionTools.bag(this.jpaProject.getAnnotatedJavaSourceTypes()); + HashBag<JavaResourceAbstractType> annotatedTypes = CollectionTools.hashBag(this.jpaProject.getAnnotatedJavaSourceTypes()); HashBag<JavaResourceAbstractType> orphans = annotatedTypes.clone(); for (JavaResourceAbstractType jrat : annotatedTypes) { if (persistenceUnit.specifiesManagedType(jrat.getTypeBinding().getQualifiedName())) { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java index 2ffa72ec05..9a6051b4c2 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaTableGenerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -567,8 +567,8 @@ public class GenericJavaTableGenerator protected boolean uniqueConstraintsAreEquivalentTo(TableGenerator generator) { // get fixed lists of the unique constraints - ArrayList<JavaSpecifiedUniqueConstraint> uniqueConstraints1 = ListTools.list(this.getUniqueConstraints()); - ArrayList<SpecifiedUniqueConstraint> uniqueConstraints2 = ListTools.list(generator.getUniqueConstraints()); + ArrayList<JavaSpecifiedUniqueConstraint> uniqueConstraints1 = ListTools.arrayList(this.getUniqueConstraints()); + ArrayList<SpecifiedUniqueConstraint> uniqueConstraints2 = ListTools.arrayList(generator.getUniqueConstraints()); if (uniqueConstraints1.size() != uniqueConstraints2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java index 4c02e68e4f..a6820eff0b 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -441,8 +441,8 @@ public class GenericOrmTableGenerator protected boolean uniqueConstraintsAreEquivalentTo(TableGenerator generator) { // get fixed lists of the unique constraints - ArrayList<OrmSpecifiedUniqueConstraint> uniqueConstraints1 = ListTools.list(this.getUniqueConstraints()); - ArrayList<SpecifiedUniqueConstraint> uniqueConstraints2 = ListTools.list(generator.getUniqueConstraints()); + ArrayList<OrmSpecifiedUniqueConstraint> uniqueConstraints1 = ListTools.arrayList(this.getUniqueConstraints()); + ArrayList<SpecifiedUniqueConstraint> uniqueConstraints2 = ListTools.arrayList(generator.getUniqueConstraints()); if (uniqueConstraints1.size() != uniqueConstraints2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer2_0.java index 456e7da096..d65e767cbe 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer2_0.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/GenericMetamodelSynchronizer2_0.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2013 Oracle. All rights reserved. + * Copyright (c) 2009, 2015 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. @@ -24,7 +24,7 @@ import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType; import org.eclipse.jpt.common.core.utility.BodySourceWriter; import org.eclipse.jpt.common.utility.internal.ClassNameTools; import org.eclipse.jpt.common.utility.internal.ObjectTools; -import org.eclipse.jpt.common.utility.internal.collection.LinkedStack; +import org.eclipse.jpt.common.utility.internal.stack.LinkedStack; import org.eclipse.jpt.common.utility.io.IndentingPrintWriter; import org.eclipse.jpt.jpa.core.context.AttributeMapping; import org.eclipse.jpt.jpa.core.context.PersistentType; diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java index 09b9bc86e0..6d4fc0f8ba 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/java/GenericJavaNamedStoredProcedureQuery2_1.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Oracle. All rights reserved. + * Copyright (c) 2013, 2015 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. @@ -296,8 +296,8 @@ public class GenericJavaNamedStoredProcedureQuery2_1 protected boolean parametersAreEquivalentTo(NamedStoredProcedureQuery2_1 other) { // get fixed lists of the stored procedure parameters - ArrayList<JavaStoredProcedureParameter2_1> parameter1 = ListTools.list(this.getParameters()); - ArrayList<? extends StoredProcedureParameter2_1> parameter2 = ListTools.list(other.getParameters()); + ArrayList<JavaStoredProcedureParameter2_1> parameter1 = ListTools.arrayList(this.getParameters()); + ArrayList<? extends StoredProcedureParameter2_1> parameter2 = ListTools.arrayList(other.getParameters()); if (parameter1.size() != parameter2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java index 69866642c8..ff89d27beb 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/context/orm/GenericOrmNamedStoredProcedureQuery2_1.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Oracle. All rights reserved. + * Copyright (c) 2013, 2015 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. @@ -309,8 +309,8 @@ public class GenericOrmNamedStoredProcedureQuery2_1 protected boolean parametersAreEquivalentTo(NamedStoredProcedureQuery2_1 other) { // get fixed lists of the stored procedure parameters - ArrayList<OrmStoredProcedureParameter2_1> parameter1 = ListTools.list(this.getParameters()); - ArrayList<? extends StoredProcedureParameter2_1> parameter2 = ListTools.list(other.getParameters()); + ArrayList<OrmStoredProcedureParameter2_1> parameter1 = ListTools.arrayList(this.getParameters()); + ArrayList<? extends StoredProcedureParameter2_1> parameter2 = ListTools.arrayList(other.getParameters()); if (parameter1.size() != parameter2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java index 12d2009d4f..10f6043b43 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpql/spi/JpaMapping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Oracle. All rights reserved. + * Copyright (c) 2011, 2015 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. @@ -103,7 +103,7 @@ public abstract class JpaMapping implements IMapping { protected ITypeDeclaration[] buildGenericTypeDeclarations() { JavaSpecifiedPersistentAttribute javaPersistentAttribute = mapping.getPersistentAttribute().getJavaPersistentAttribute(); JavaResourceAttribute resource = javaPersistentAttribute == null ? null : javaPersistentAttribute.getResourceAttribute(); - List<ITypeDeclaration> declarations = ListTools.list(buildGenericTypeDeclarations(resource)); + List<ITypeDeclaration> declarations = ListTools.arrayList(buildGenericTypeDeclarations(resource)); return declarations.toArray(new ITypeDeclaration[declarations.size()]); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java index 66c734d2bc..902a23f655 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -440,7 +440,7 @@ public class EclipseLinkPersistenceUnit * unit's scope, with duplicates removed. */ public Iterable<String> getUniqueConverterNames() { - return CollectionTools.set(this.getNonEmptyConverterNames(), this.getConvertersSize()); + return CollectionTools.hashSet(this.getNonEmptyConverterNames(), this.getConvertersSize()); } protected Iterable<String> getNonEmptyConverterNames() { @@ -460,7 +460,7 @@ public class EclipseLinkPersistenceUnit * @see #buildQueries() */ protected Iterable<EclipseLinkConverter> buildConverters() { - ArrayList<EclipseLinkConverter> result = ListTools.list(this.getMappingFileConverters()); + ArrayList<EclipseLinkConverter> result = ListTools.arrayList(this.getMappingFileConverters()); HashSet<String> mappingFileConverterNames = this.convertToNames(result); HashMap<String, ArrayList<EclipseLinkConverter>> javaConverters = this.mapByName(this.getAllJavaConverters()); @@ -1370,7 +1370,7 @@ public class EclipseLinkPersistenceUnit protected <M extends JpaNamedContextModel> HashMap<String, ArrayList<M>> extractEclipseLinkConvertibleJavaModels(Iterable<M> allJavaModels, Iterable<M> mappingFileModels, EquivalencyAdapter<M> adapter) { HashMap<String, ArrayList<M>> convertibleModels = new HashMap<String, ArrayList<M>>(); - HashSet<String> mappingFileModelNames = this.convertToNames(ListTools.list(mappingFileModels)); + HashSet<String> mappingFileModelNames = this.convertToNames(ListTools.arrayList(mappingFileModels)); HashMap<String, ArrayList<M>> allJavaModelsByName = this.mapByName(allJavaModels); for (Map.Entry<String, ArrayList<M>> entry : allJavaModelsByName.entrySet()) { String javaModelName = entry.getKey(); diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaObjectTypeConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaObjectTypeConverter.java index 5916887d72..ac65fd2c67 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaObjectTypeConverter.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaObjectTypeConverter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -299,8 +299,8 @@ public class EclipseLinkJavaObjectTypeConverter protected boolean conversionValuesAreEquivalentTo(EclipseLinkObjectTypeConverter converter) { // get fixed lists of the conversion values - ArrayList<EclipseLinkJavaConversionValue> conversionValues1 = ListTools.list(this.getConversionValues()); - ArrayList<? extends EclipseLinkConversionValue> conversionValues2 = ListTools.list(converter.getConversionValues()); + ArrayList<EclipseLinkJavaConversionValue> conversionValues1 = ListTools.arrayList(this.getConversionValues()); + ArrayList<? extends EclipseLinkConversionValue> conversionValues2 = ListTools.arrayList(converter.getConversionValues()); if (conversionValues1.size() != conversionValues2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmObjectTypeConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmObjectTypeConverter.java index e4c0714a17..8dc5144393 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmObjectTypeConverter.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmObjectTypeConverter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -431,8 +431,8 @@ public class EclipseLinkOrmObjectTypeConverter protected boolean conversionValuesAreEquivalentTo(EclipseLinkObjectTypeConverter converter) { // get fixed lists of the conversion values - ArrayList<EclipseLinkOrmConversionValue> conversionValues1 = ListTools.list(this.getConversionValues()); - ArrayList<? extends EclipseLinkConversionValue> conversionValues2 = ListTools.list(converter.getConversionValues()); + ArrayList<EclipseLinkOrmConversionValue> conversionValues1 = ListTools.arrayList(this.getConversionValues()); + ArrayList<? extends EclipseLinkConversionValue> conversionValues2 = ListTools.arrayList(converter.getConversionValues()); if (conversionValues1.size() != conversionValues2.size()) { return false; } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkCustomization.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkCustomization.java index 8cd1d0c61b..a77196bbf6 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkCustomization.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkCustomization.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -96,7 +96,7 @@ public class EclipseLinkCustomization } private List<String> buildSessionCustomizers() { - return ListTools.list(this.convertToValues(this.getPropertiesSetWithPrefix(ECLIPSELINK_SESSION_CUSTOMIZER))); + return ListTools.arrayList(this.convertToValues(this.getPropertiesSetWithPrefix(ECLIPSELINK_SESSION_CUSTOMIZER))); } private Iterable<String> convertToValues(Iterable<PersistenceUnit.Property> properties) { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkPersistenceUnitProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkPersistenceUnitProperties.java index 97e57fbff9..dbd316c749 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkPersistenceUnitProperties.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLinkPersistenceUnitProperties.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2011 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -30,7 +30,7 @@ public abstract class EclipseLinkPersistenceUnitProperties extends AbstractPersi // ******** Convenience methods ******** protected Set<PersistenceUnit.Property> getPropertiesSetWithPrefix(String keyPrefix) { - return CollectionTools.set(this.getPersistenceUnit().getPropertiesWithNamePrefix(keyPrefix)); + return CollectionTools.hashSet(this.getPersistenceUnit().getPropertiesWithNamePrefix(keyPrefix)); } /** diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java index 32e3082d66..320f425219 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkConversionValueDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2012 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -68,7 +68,7 @@ public class EclipseLinkConversionValueDialog protected EclipseLinkConversionValueStateObject buildStateObject() { String dataValue = null; String objectValue = null; - Set<String> dataValues = CollectionTools.set(this.objectTypeConverter.getDataValues(), this.objectTypeConverter.getDataValuesSize()); + Set<String> dataValues = CollectionTools.hashSet(this.objectTypeConverter.getDataValues(), this.objectTypeConverter.getDataValuesSize()); if (isEditDialog()) { dataValue = this.conversionValue.getDataValue(); objectValue = this.conversionValue.getObjectValue(); diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java index 6cf5bfdf57..a790902646 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -169,7 +169,7 @@ public class EclipseLinkProfilerClassChooser private CollectionValueModel<String> buildProfilersCollectionHolder() { return new SimpleCollectionValueModel<String>( - CollectionTools.collection(this.buildProfilers()) + CollectionTools.hashBag(this.buildProfilers()) ); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java index c793e897c6..376679fe39 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -175,7 +175,7 @@ public class EclipseLinkLoggerClassChooser private CollectionValueModel<String> buildLoggersCollectionHolder() { return new SimpleCollectionValueModel<String>( - CollectionTools.collection(this.buildLoggers()) + CollectionTools.hashBag(this.buildLoggers()) ); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java index 1aea403371..db073d071d 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -505,7 +505,7 @@ public class EclipseLinkPersistenceUnitOptionsEditorPage private CollectionValueModel<String> buildTargetDatabasesCollectionHolder() { return new SimpleCollectionValueModel<String>( - CollectionTools.collection(buildTargetDatabases()) + CollectionTools.hashBag(buildTargetDatabases()) ); } @@ -637,7 +637,7 @@ public class EclipseLinkPersistenceUnitOptionsEditorPage private CollectionValueModel<String> buildTargetServersCollectionHolder() { return new SimpleCollectionValueModel<String>( - CollectionTools.collection(buildTargetServers()) + CollectionTools.hashBag(buildTargetServers()) ); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaJavaCompletionProposalComputer.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaJavaCompletionProposalComputer.java index ad8a244952..e0fb3020e9 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaJavaCompletionProposalComputer.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaJavaCompletionProposalComputer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -110,7 +110,7 @@ public class JpaJavaCompletionProposalComputer return Collections.emptyList(); } - Collection<JpaStructureNode> rootStructureNodes = CollectionTools.collection(jpaFile.getRootStructureNodes()); + Collection<JpaStructureNode> rootStructureNodes = CollectionTools.hashBag(jpaFile.getRootStructureNodes()); if (rootStructureNodes.isEmpty()) { return Collections.emptyList(); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaXmlCompletionProposalComputer.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaXmlCompletionProposalComputer.java index f228193646..fa9e632c86 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaXmlCompletionProposalComputer.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/JpaXmlCompletionProposalComputer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Oracle. All rights reserved. + * Copyright (c) 2012, 2015 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. @@ -224,7 +224,7 @@ public class JpaXmlCompletionProposalComputer extends DefaultJpaXmlCompletionPro JpaFile jpaFile = (JpaFile) file.getAdapter(JpaFile.class); if (jpaFile == null) return Collections.emptyList(); - Collection<JpaStructureNode> rootStructureNodes = CollectionTools.collection(jpaFile.getRootStructureNodes()); + Collection<JpaStructureNode> rootStructureNodes = CollectionTools.hashBag(jpaFile.getRootStructureNodes()); if (rootStructureNodes.isEmpty()) { return Collections.emptyList(); } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/BaseJoinColumnStateObject.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/BaseJoinColumnStateObject.java index fee1d0c969..657993f27f 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/BaseJoinColumnStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/BaseJoinColumnStateObject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -120,7 +120,7 @@ public abstract class BaseJoinColumnStateObject if (table == null) { return EmptyListIterator.instance(); } - return ListTools.list(table.getSortedColumnIdentifiers()).listIterator(); + return ListTools.arrayList(table.getSortedColumnIdentifiers()).listIterator(); } private static int columnsSize(Table table) { @@ -340,8 +340,8 @@ public abstract class BaseJoinColumnStateObject } public void setTable(String table) { - ArrayList<String> oldNames = ListTools.list(this.names()); - ArrayList<String> oldRefColNames = ListTools.list(this.referenceColumnNames()); + ArrayList<String> oldNames = ListTools.arrayList(this.names()); + ArrayList<String> oldRefColNames = ListTools.arrayList(this.referenceColumnNames()); String oldTable = this.table; this.table = table; this.firePropertyChanged(TABLE_PROPERTY, oldTable, table); diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java index ce6c714ddb..54618cbe6d 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnInJoiningStrategyStateObject.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. + * Copyright (c) 2008, 2015 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. @@ -56,7 +56,7 @@ public class JoinColumnInJoiningStrategyStateObject @Override public ListIterator<String> tables() { Schema schema = getDbSchema(); - return schema == null ? super.tables() : ListTools.list(schema.getSortedTableIdentifiers()).listIterator(); + return schema == null ? super.tables() : ListTools.arrayList(schema.getSortedTableIdentifiers()).listIterator(); } protected Schema getDbSchema() { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TemporalTypeCombo.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TemporalTypeCombo.java index 2708942b5f..f96cd0e87d 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TemporalTypeCombo.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TemporalTypeCombo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2013 Oracle. All rights reserved. + * Copyright (c) 2006, 2015 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. @@ -90,7 +90,7 @@ public class TemporalTypeCombo extends Pane<BaseTemporalConverter> { } private List<TemporalType> buildSortedTemporalTypeList() { - return ListTools.sort(ListTools.list(TemporalType.values()), this.buildTemporalTypeComparator()); + return ListTools.sort(ListTools.arrayList(TemporalType.values()), this.buildTemporalTypeComparator()); } private Comparator<TemporalType> buildTemporalTypeComparator() { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java index 543daa5b8b..ae844d24df 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -1137,7 +1137,7 @@ public class JpaProjectPropertiesPage } void collectionChanged() { - this.fireCollectionChanged(CollectionValueModel.VALUES, CollectionTools.collection(this.iterator())); + this.fireCollectionChanged(CollectionValueModel.VALUES, CollectionTools.hashBag(this.iterator())); } public Iterator<String> iterator() { @@ -1377,7 +1377,7 @@ public class JpaProjectPropertiesPage private void processJavaProjectDelta(IJavaElementDelta delta) { IJavaProject javaProject = (IJavaProject) delta.getElement(); if (javaProject.equals(this.subject.getJavaProject()) && this.classpathHasChanged(delta)) { - this.fireCollectionChanged(CollectionValueModel.VALUES, CollectionTools.collection(this.iterator())); + this.fireCollectionChanged(CollectionValueModel.VALUES, CollectionTools.hashBag(this.iterator())); } } diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/DatabaseGroup.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/DatabaseGroup.java index 42865003af..470f50db38 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/DatabaseGroup.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/DatabaseGroup.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -210,7 +210,7 @@ public class DatabaseGroup } private SortedSet<String> buildSortedConnectionProfileNames() { - return CollectionTools.sortedSet(this.getConnectionProfileNames()); + return CollectionTools.treeSet(this.getConnectionProfileNames()); } private Iterable<String> getConnectionProfileNames() { diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/TablesSelectorWizardPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/TablesSelectorWizardPage.java index 68411e8ffa..ced357776d 100644 --- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/TablesSelectorWizardPage.java +++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/TablesSelectorWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -278,7 +278,7 @@ public class TablesSelectorWizardPage extends WizardPage { if(this.fetchTablesJobIsRunning()) { return Collections.<Table> emptyList(); } - return CollectionTools.collection(schema.getTables()); + return CollectionTools.hashBag(schema.getTables()); } private Collection<Table> possibleTables() { @@ -636,7 +636,7 @@ public class TablesSelectorWizardPage extends WizardPage { schema.getName())); subMonitor.worked(20); - tables.addAll(CollectionTools.collection(schema.getTables())); + tables.addAll(CollectionTools.hashBag(schema.getTables())); subMonitor.worked(95); } diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java index 7fa854a6d6..f0d98e76dd 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/java/JavaAttributeOverrideTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -180,7 +180,7 @@ public class JavaAttributeOverrideTests extends ContextModelTestCase assertEquals("id", attributeOverride.getColumn().getDefaultName()); - JavaPersistentType mappedSuperclass = ListTools.list(getPersistenceUnit().getSpecifiedClassRefs()).get(1).getJavaPersistentType(); + JavaPersistentType mappedSuperclass = ListTools.arrayList(getPersistenceUnit().getSpecifiedClassRefs()).get(1).getJavaPersistentType(); BasicMapping basicMapping = (BasicMapping) mappedSuperclass.getAttributeNamed("id").getMapping(); basicMapping.getColumn().setSpecifiedName("FOO"); @@ -203,7 +203,7 @@ public class JavaAttributeOverrideTests extends ContextModelTestCase assertEquals("AnnotationTestTypeChild", attributeOverride.getColumn().getDefaultTableName()); - JavaPersistentType mappedSuperclass = ListTools.list(getPersistenceUnit().getSpecifiedClassRefs()).get(1).getJavaPersistentType(); + JavaPersistentType mappedSuperclass = ListTools.arrayList(getPersistenceUnit().getSpecifiedClassRefs()).get(1).getJavaPersistentType(); BasicMapping basicMapping = (BasicMapping) mappedSuperclass.getAttributeNamed("id").getMapping(); basicMapping.getColumn().setSpecifiedTableName("BAR"); diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmSecondaryTableTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmSecondaryTableTests.java index 962bb1033f..d761800fdc 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmSecondaryTableTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/orm/OrmSecondaryTableTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Oracle. All rights reserved. + * Copyright (c) 2007, 2015 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. @@ -750,7 +750,7 @@ public class OrmSecondaryTableTests extends ContextModelTestCase javaSecondaryTable.addUniqueConstraint().addColumnName("BAR"); javaSecondaryTable.addUniqueConstraint().addColumnName("BAZ"); - List<UniqueConstraint> uniqueConstraints = ListTools.list(ormSecondaryTable.getUniqueConstraints()); + List<UniqueConstraint> uniqueConstraints = ListTools.arrayList(ormSecondaryTable.getUniqueConstraints()); assertEquals(3, uniqueConstraints.size()); assertEquals("FOO", uniqueConstraints.get(0).getColumnName(0)); assertEquals("BAR", uniqueConstraints.get(1).getColumnName(0)); diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/persistence/Generic2_0JpaMetadataConversionTests.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/persistence/Generic2_0JpaMetadataConversionTests.java index 61677e3eff..7f880fd7dd 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/persistence/Generic2_0JpaMetadataConversionTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/persistence/Generic2_0JpaMetadataConversionTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Oracle. All rights reserved. + * Copyright (c) 2011, 2015 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. @@ -244,7 +244,7 @@ public class Generic2_0JpaMetadataConversionTests extends assertEquals(0, entity.getQueryContainer().getNamedNativeQueriesSize()); // test the mapping file queries have correct values - Collection<OrmNamedNativeQuery> namedNativeQueries = CollectionTools.collection(entityMappings.getQueryContainer().getNamedNativeQueries()); + Collection<OrmNamedNativeQuery> namedNativeQueries = CollectionTools.hashBag(entityMappings.getQueryContainer().getNamedNativeQueries()); // test the first mapping file query OrmNamedNativeQuery nnq1 = selectModelNamed(namedNativeQueries, "nnq1"); @@ -407,7 +407,7 @@ public class Generic2_0JpaMetadataConversionTests extends assertEquals(0, mappedSuperclass.getQueryContainer().getNamedNativeQueriesSize()); // test the mapping file queries have correct values - Collection<OrmNamedNativeQuery> namedNativeQueries = CollectionTools.collection(entityMappings.getQueryContainer().getNamedNativeQueries()); + Collection<OrmNamedNativeQuery> namedNativeQueries = CollectionTools.hashBag(entityMappings.getQueryContainer().getNamedNativeQueries()); // test the first mapping file query OrmNamedNativeQuery nnq1 = selectModelNamed(namedNativeQueries, "nnq1"); diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLink2_2JpaMetadataConversionTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLink2_2JpaMetadataConversionTests.java index 1237aedf73..c810a9e8a0 100644 --- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLink2_2JpaMetadataConversionTests.java +++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLink2_2JpaMetadataConversionTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Oracle. All rights reserved. + * Copyright (c) 2011, 2015 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. @@ -449,7 +449,7 @@ public class EclipseLink2_2JpaMetadataConversionTests extends EclipseLink2_2Cont assertEquals(mapping.getConverterContainer().getConvertersSize(), 0); // test the mapping file converter have correct values - Collection<EclipseLinkOrmCustomConverter> customConverters = CollectionTools.collection(entityMappings.getConverterContainer().getCustomConverters()); + Collection<EclipseLinkOrmCustomConverter> customConverters = CollectionTools.hashBag(entityMappings.getConverterContainer().getCustomConverters()); EclipseLinkCustomConverter custom1 = Generic2_0JpaMetadataConversionTests.selectModelNamed(customConverters, "custom1"); assertEquals("custom1", custom1.getName()); assertEquals("foo1", custom1.getConverterClass()); |