cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/9] cayenne git commit: CAY-2351 Remove commons-collections usage completely replace commons-collections with plain java
Date Mon, 21 Aug 2017 09:29:14 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master de0969a08 -> afb42ed4c


CAY-2351 Remove commons-collections usage completely
  replace commons-collections with plain java


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/10e07069
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/10e07069
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/10e07069

Branch: refs/heads/master
Commit: 10e070695d6ecd60976e3812630df8dd38b219cd
Parents: fddb229
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Fri Aug 4 12:16:16 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Thu Aug 17 12:41:56 2017 +0300

----------------------------------------------------------------------
 .../access/jdbc/RowDescriptorBuilder.java       |  2 +-
 .../cayenne/ashwood/graph/DepthFirstSearch.java |  7 ++--
 .../ashwood/graph/FilterArcIterator.java        | 20 +++++------
 .../cayenne/ashwood/graph/FilterIteration.java  | 31 ++++++++---------
 .../cayenne/ashwood/graph/StrongConnection.java | 28 +++++++--------
 .../unit/di/server/ConnectionProperties.java    | 36 +++++++++++++-------
 .../ServerCaseDataSourceInfoProvider.java       | 14 +++++---
 .../velocity/SQLTemplateResourceManager.java    |  4 +--
 .../apache/cayenne/wocompat/EOModelHelper.java  |  7 ++--
 9 files changed, 80 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
index 39d39cf..3f4c2c8 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/RowDescriptorBuilder.java
@@ -135,7 +135,7 @@ public class RowDescriptorBuilder {
         }
 
         if(validateDuplicateColumnNames && !duplicates.isEmpty()) {
-            logger.warn("Found duplicated columns '" + Util.join(duplicates, "', '") + "'
in row descriptor. " +
+            logger.warn("Found duplicated columns '" + String.join("', '", duplicates) +
"' in row descriptor. " +
                     "This can lead to errors when converting result to persistent objects.");
         }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/DepthFirstSearch.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/DepthFirstSearch.java
b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/DepthFirstSearch.java
index 9aecb1e..31a8f95 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/DepthFirstSearch.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/DepthFirstSearch.java
@@ -59,12 +59,11 @@
  */
 package org.apache.cayenne.ashwood.graph;
 
+import java.util.ArrayDeque;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
-import org.apache.commons.collections.ArrayStack;
-
 /**
  * @since 3.1
  */
@@ -72,12 +71,12 @@ public class DepthFirstSearch<E> implements Iterator<E> {
 
 	protected DigraphIteration<E, ?> factory;
 	protected E firstVertex;
-	protected ArrayStack stack;
+	protected ArrayDeque<ArcIterator<E, ?>> stack;
 	protected Set<E> seen;
 
 	public DepthFirstSearch(DigraphIteration<E, ?> factory, E firstVertex) {
 
-		this.stack = new ArrayStack();
+		this.stack = new ArrayDeque<>();
 		this.seen = new HashSet<>();
 		this.factory = factory;
 		this.firstVertex = firstVertex;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterArcIterator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterArcIterator.java
b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterArcIterator.java
index 47c4744..81653ab 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterArcIterator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterArcIterator.java
@@ -60,8 +60,8 @@
 package org.apache.cayenne.ashwood.graph;
 
 import java.util.NoSuchElementException;
+import java.util.function.Predicate;
 
-import org.apache.commons.collections.Predicate;
 
 /**
  * @since 3.1
@@ -69,25 +69,25 @@ import org.apache.commons.collections.Predicate;
 public class FilterArcIterator<E, V> implements ArcIterator<E, V> {
 
     private ArcIterator<E, V> iterator;
-    private Predicate acceptOrigin, acceptDestination;
-    private Predicate acceptArc;
+    private Predicate<E> acceptOrigin, acceptDestination;
+    private Predicate<V> acceptArc;
 
     private E nextOrigin, nextDst;
     private V nextArc;
     private boolean nextObjectSet = false;
 
-    public FilterArcIterator(ArcIterator<E, V> iterator, Predicate acceptOrigin,
-            Predicate acceptDestination, Predicate acceptArc) {
+    public FilterArcIterator(ArcIterator<E, V> iterator, Predicate<E> acceptOrigin,
+            Predicate<E> acceptDestination, Predicate<V> acceptArc) {
 
         this.iterator = iterator;
         this.acceptOrigin = acceptOrigin;
         this.acceptDestination = acceptDestination;
         this.acceptArc = acceptArc;
         nextOrigin = iterator.getOrigin();
-        if (!acceptOrigin.evaluate(nextOrigin))
+        if (!acceptOrigin.test(nextOrigin))
             nextOrigin = null;
         nextDst = iterator.getDestination();
-        if (!acceptDestination.evaluate(nextDst))
+        if (!acceptDestination.test(nextDst))
             nextDst = null;
     }
 
@@ -128,9 +128,9 @@ public class FilterArcIterator<E, V> implements ArcIterator<E,
V> {
             V arc = iterator.next();
             E origin = iterator.getOrigin();
             E dst = iterator.getDestination();
-            if (acceptOrigin.evaluate(origin)
-                    && acceptArc.evaluate(arc)
-                    && acceptDestination.evaluate(dst)) {
+            if (acceptOrigin.test(origin)
+                    && acceptArc.test(arc)
+                    && acceptDestination.test(dst)) {
                 nextArc = arc;
                 nextOrigin = origin;
                 nextDst = dst;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterIteration.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterIteration.java
b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterIteration.java
index 16d0e77..e679c22 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterIteration.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/FilterIteration.java
@@ -60,10 +60,8 @@
 package org.apache.cayenne.ashwood.graph;
 
 import java.util.Iterator;
-
-import org.apache.commons.collections.IteratorUtils;
-import org.apache.commons.collections.Predicate;
-import org.apache.commons.collections.functors.TruePredicate;
+import java.util.function.Predicate;
+import java.util.stream.StreamSupport;
 
 /**
  * @since 3.1
@@ -71,22 +69,23 @@ import org.apache.commons.collections.functors.TruePredicate;
 public class FilterIteration<E, V> implements DigraphIteration<E, V> {
 
     private DigraphIteration<E, V> digraph;
-    private Predicate acceptVertex;
-    private Predicate acceptArc;
+    private Predicate<E> acceptVertex;
+    private Predicate<V> acceptArc;
 
-    public FilterIteration(DigraphIteration<E, V> digraph, Predicate acceptVertex,
-            Predicate acceptArc) {
+    public FilterIteration(DigraphIteration<E, V> digraph, Predicate<E> acceptVertex,
+            Predicate<V> acceptArc) {
         this.digraph = digraph;
         this.acceptVertex = acceptVertex;
         this.acceptArc = acceptArc;
     }
 
     public Iterator<E> vertexIterator() {
-        return IteratorUtils.filteredIterator(digraph.vertexIterator(), acceptVertex);
+        Iterable<E> iterable = () -> digraph.vertexIterator();
+        return StreamSupport.stream(iterable.spliterator(), false).filter(acceptVertex).iterator();
     }
 
     public ArcIterator<E, V> arcIterator() {
-        return new FilterArcIterator<E, V>(
+        return new FilterArcIterator<>(
                 digraph.arcIterator(),
                 acceptVertex,
                 acceptVertex,
@@ -94,22 +93,22 @@ public class FilterIteration<E, V> implements DigraphIteration<E,
V> {
     }
 
     public ArcIterator<E, V> outgoingIterator(E vertex) {
-        if (!acceptVertex.evaluate(vertex))
+        if (!acceptVertex.test(vertex))
             return EmptyIterator.instance();
-        return new FilterArcIterator<E, V>(
+        return new FilterArcIterator<>(
                 digraph.outgoingIterator(vertex),
-                TruePredicate.INSTANCE,
+                v -> true,
                 acceptVertex,
                 acceptArc);
     }
 
     public ArcIterator<E, V> incomingIterator(E vertex) {
-        if (!acceptVertex.evaluate(vertex))
+        if (!acceptVertex.test(vertex))
             return EmptyIterator.instance();
-        return new FilterArcIterator<E, V>(
+        return new FilterArcIterator<>(
                 digraph.incomingIterator(vertex),
                 acceptVertex,
-                TruePredicate.INSTANCE,
+                v -> true,
                 acceptArc);
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
index 756b1b3..d099ea1 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
@@ -59,11 +59,7 @@
  */
 package org.apache.cayenne.ashwood.graph;
 
-import org.apache.commons.collections.ArrayStack;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.Predicate;
-import org.apache.commons.collections.functors.TruePredicate;
-
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -72,6 +68,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
+import java.util.function.Predicate;
 
 /**
  * @since 3.1
@@ -85,17 +82,16 @@ public class StrongConnection<E, V> implements Iterator<Collection<E>>
{
 	private DepthFirstSearch<E> reverseDfs;
 	private Set<E> seen = new HashSet<E>();
 	private Iterator<E> vertexIterator;
-	private ArrayStack dfsStack;
+	private ArrayDeque<E> dfsStack;
 	private DFSSeenVerticesPredicate reverseDFSFilter;
 
 	public StrongConnection(DigraphIteration<E, V> digraph) {
 
-		this.dfsStack = new ArrayStack();
+		this.dfsStack = new ArrayDeque<>();
 		this.reverseDFSFilter = new DFSSeenVerticesPredicate();
 		this.digraph = digraph;
-		this.filteredDigraph = new FilterIteration<>(digraph, new NotSeenPredicate(), TruePredicate.INSTANCE);
-		this.reverseDigraph = new FilterIteration<>(new ReversedIteration<>(digraph),
reverseDFSFilter,
-				TruePredicate.INSTANCE);
+		this.filteredDigraph = new FilterIteration<>(digraph, new NotSeenPredicate(), arc
-> true);
+		this.reverseDigraph = new FilterIteration<>(new ReversedIteration<>(digraph),
reverseDFSFilter, arc -> true);
 		this.vertexIterator = filteredDigraph.vertexIterator();
 
 		runDirectDFS();
@@ -123,7 +119,9 @@ public class StrongConnection<E, V> implements Iterator<Collection<E>>
{
 	public Digraph<Collection<E>, Collection<V>> contract(Digraph<Collection<E>,
Collection<V>> contractedDigraph) {
 
 		Collection<Collection<E>> components = new ArrayList<>();
-		CollectionUtils.addAll(components, this);
+		while (this.hasNext()) {
+			components.add(this.next());
+		}
 
 		Map<E, Collection<E>> memberToComponent = new HashMap<>();
 
@@ -221,20 +219,20 @@ public class StrongConnection<E, V> implements Iterator<Collection<E>>
{
 		return component;
 	}
 
-	private class DFSSeenVerticesPredicate implements Predicate {
+	private class DFSSeenVerticesPredicate implements Predicate<E> {
 
 		private Set<E> seenVertices = new HashSet<>();
 
 		@Override
-		public boolean evaluate(Object vertex) {
+		public boolean test(E vertex) {
 			return seenVertices.contains(vertex);
 		}
 	}
 
-	private class NotSeenPredicate implements Predicate {
+	private class NotSeenPredicate implements Predicate<E> {
 
 		@Override
-		public boolean evaluate(Object vertex) {
+		public boolean test(E vertex) {
 			return !seen.contains(vertex);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ConnectionProperties.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ConnectionProperties.java
b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ConnectionProperties.java
index 525fc39..22b91fb 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ConnectionProperties.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ConnectionProperties.java
@@ -20,13 +20,13 @@
 package org.apache.cayenne.unit.di.server;
 
 import org.apache.cayenne.conn.DataSourceInfo;
-import org.apache.commons.collections.ExtendedProperties;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * ConnectionProperties handles a set of DataSourceInfo objects using
@@ -50,10 +50,20 @@ class ConnectionProperties {
 	/**
 	 * Constructor for ConnectionProperties.
 	 */
-	ConnectionProperties(ExtendedProperties props) {
+	ConnectionProperties(Map<String, String> props) {
 		connectionInfos = new HashMap<>();
 		for (String name : extractNames(props)) {
-			DataSourceInfo dsi = buildDataSourceInfo(props.subset(name));
+			DataSourceInfo dsi = buildDataSourceInfo(
+					props.entrySet().stream()
+							.filter(e -> e.getKey().startsWith(name + '.'))
+							.collect(Collectors.toMap(
+									e -> {
+										String key = e.getKey();
+										return key.substring(key.indexOf('.') + 1);
+									},
+									Map.Entry::getValue
+							))
+			);
 			connectionInfos.put(name, dsi);
 		}
 	}
@@ -73,21 +83,21 @@ class ConnectionProperties {
 	/**
 	 * Creates a DataSourceInfo object from a set of properties.
 	 */
-	private DataSourceInfo buildDataSourceInfo(ExtendedProperties props) {
+	private DataSourceInfo buildDataSourceInfo(Map<String, String> props) {
 		DataSourceInfo dsi = new DataSourceInfo();
 
-		String adapter = props.getString(ADAPTER_KEY);
+		String adapter = props.get(ADAPTER_KEY);
 
 		// try legacy adapter key
 		if (adapter == null) {
-			adapter = props.getString(ADAPTER20_KEY);
+			adapter = props.get(ADAPTER20_KEY);
 		}
 
 		dsi.setAdapterClassName(adapter);
-		dsi.setUserName(props.getString(USER_NAME_KEY));
-		dsi.setPassword(props.getString(PASSWORD_KEY));
-		dsi.setDataSourceUrl(props.getString(URL_KEY));
-		dsi.setJdbcDriver(props.getString(DRIVER_KEY));
+		dsi.setUserName(props.get(USER_NAME_KEY));
+		dsi.setPassword(props.get(PASSWORD_KEY));
+		dsi.setDataSourceUrl(props.get(URL_KEY));
+		dsi.setJdbcDriver(props.get(DRIVER_KEY));
 		dsi.setMinConnections(MIN_CONNECTIONS);
 		dsi.setMaxConnections(MAX_CONNECTIONS);
 
@@ -97,9 +107,9 @@ class ConnectionProperties {
 	/**
 	 * Returns a list of connection names configured in the properties object.
 	 */
-	private List<String> extractNames(ExtendedProperties props) {
-		Iterator<?> it = props.getKeys();
-		List<String> list = new ArrayList<String>();
+	private List<String> extractNames(Map<String, String> props) {
+		Iterator<?> it = props.keySet().iterator();
+		List<String> list = new ArrayList<>();
 
 		while (it.hasNext()) {
 			String key = (String) it.next();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
index d861a1b..7258fba 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataSourceInfoProvider.java
@@ -25,14 +25,15 @@ import org.apache.cayenne.dba.h2.H2Adapter;
 import org.apache.cayenne.dba.hsqldb.HSQLDBAdapter;
 import org.apache.cayenne.dba.sqlite.SQLiteAdapter;
 import org.apache.cayenne.di.Provider;
-import org.apache.commons.collections.ExtendedProperties;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.File;
+import java.io.FileReader;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Properties;
 
 public class ServerCaseDataSourceInfoProvider implements Provider<DataSourceInfo> {
 
@@ -52,11 +53,16 @@ public class ServerCaseDataSourceInfoProvider implements Provider<DataSourceInfo
 
     public ServerCaseDataSourceInfoProvider() throws IOException {
 
+        Map<String, String> propertiesMap = new HashMap<>();
+
         File file = connectionPropertiesFile();
-        ExtendedProperties properties = file.exists() ? new ExtendedProperties(file.getAbsolutePath())
-                : new ExtendedProperties();
+        if(file.exists()) {
+            Properties properties = new Properties();
+            properties.load(new FileReader(file));
+            properties.forEach((k, v) -> propertiesMap.put(k.toString(), v.toString()));
+        }
 
-        this.connectionProperties = new ConnectionProperties(properties);
+        this.connectionProperties = new ConnectionProperties(propertiesMap);
         logger.info("Loaded  " + connectionProperties.size() + " DataSource configurations
from properties file");
 
         this.inMemoryDataSources = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/cayenne-velocity/src/main/java/org/apache/cayenne/velocity/SQLTemplateResourceManager.java
----------------------------------------------------------------------
diff --git a/cayenne-velocity/src/main/java/org/apache/cayenne/velocity/SQLTemplateResourceManager.java
b/cayenne-velocity/src/main/java/org/apache/cayenne/velocity/SQLTemplateResourceManager.java
index 085e2be..97da483 100644
--- a/cayenne-velocity/src/main/java/org/apache/cayenne/velocity/SQLTemplateResourceManager.java
+++ b/cayenne-velocity/src/main/java/org/apache/cayenne/velocity/SQLTemplateResourceManager.java
@@ -23,8 +23,8 @@ import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.util.Map;
 
+import org.apache.cayenne.util.concurrentlinkedhashmap.ConcurrentLinkedHashMap;
 import org.apache.commons.collections.ExtendedProperties;
-import org.apache.commons.collections.map.LRUMap;
 import org.apache.velocity.Template;
 import org.apache.velocity.exception.ParseErrorException;
 import org.apache.velocity.exception.ResourceNotFoundException;
@@ -48,7 +48,7 @@ public class SQLTemplateResourceManager
 
     public void initialize(RuntimeServices rs) {
         super.rsvc = rs;
-        this.templateCache = new LRUMap(100);
+        this.templateCache = new ConcurrentLinkedHashMap.Builder<String, Template>().maximumWeightedCapacity(100).build();
     }
 
     public void clearCache() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/10e07069/modeler/cayenne-wocompat/src/main/java/org/apache/cayenne/wocompat/EOModelHelper.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-wocompat/src/main/java/org/apache/cayenne/wocompat/EOModelHelper.java
b/modeler/cayenne-wocompat/src/main/java/org/apache/cayenne/wocompat/EOModelHelper.java
index fd05744..31a9567 100644
--- a/modeler/cayenne-wocompat/src/main/java/org/apache/cayenne/wocompat/EOModelHelper.java
+++ b/modeler/cayenne-wocompat/src/main/java/org/apache/cayenne/wocompat/EOModelHelper.java
@@ -33,7 +33,6 @@ import java.util.Map;
 
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.wocompat.parser.Parser;
-import org.apache.commons.collections.IteratorUtils;
 
 /**
  * Helper class used by EOModelProcessor. EOModelHelper loads an EOModel from
@@ -252,7 +251,7 @@ public class EOModelHelper {
 	 * @since 1.1
 	 */
 	public List modelNamesAsList() {
-		return new ArrayList(entityClassIndex.keySet());
+		return new ArrayList<>(entityClassIndex.keySet());
 	}
 
 	public Map getPrototypeAttributeMapFor(String aPrototypeAttributeName) {
@@ -262,7 +261,7 @@ public class EOModelHelper {
 
 			// no prototypes
 			if (eoPrototypesEntityMap == null) {
-				prototypeValues = Collections.EMPTY_MAP;
+				prototypeValues = Collections.emptyMap();
 			} else {
 				List eoPrototypeAttributes = (List) eoPrototypesEntityMap.get("attributes");
 
@@ -310,7 +309,7 @@ public class EOModelHelper {
 	public Iterator queryNames(String entityName) {
 		Map queryPlist = (Map) entityQueryIndex.get(entityName);
 		if (queryPlist == null || queryPlist.isEmpty()) {
-			return IteratorUtils.EMPTY_ITERATOR;
+			return Collections.emptyIterator();
 		}
 
 		return queryPlist.keySet().iterator();


Mime
View raw message