diff options
Diffstat (limited to 'src/main/java/com/c2kernel/entity/proxy/AgentProxy.java')
| -rw-r--r-- | src/main/java/com/c2kernel/entity/proxy/AgentProxy.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java b/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java index 6d2b17d..18b8ae8 100644 --- a/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java +++ b/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java @@ -11,7 +11,7 @@ package com.c2kernel.entity.proxy;
import java.util.Date;
-import java.util.Enumeration;
+import java.util.Iterator;
import com.c2kernel.common.AccessRightsException;
import com.c2kernel.common.InvalidDataException;
@@ -257,14 +257,14 @@ public class AgentProxy extends EntityProxy /** Let scripts resolve items */
public ItemProxy searchItem(String name) throws ObjectNotFoundException {
- Enumeration<Path> results = Gateway.getLookup().search(new DomainPath(""),name);
+ Iterator<Path> results = Gateway.getLookup().search(new DomainPath(""),name);
Path returnPath = null;
- if (!results.hasMoreElements())
+ if (!results.hasNext())
throw new ObjectNotFoundException(name, "");
- while(results.hasMoreElements()) {
- Path nextMatch = results.nextElement();
+ while(results.hasNext()) {
+ Path nextMatch = results.next();
if (returnPath != null && nextMatch.getSysKey() != -1 && returnPath.getSysKey() != nextMatch.getSysKey())
throw new ObjectNotFoundException("Too many items with that name");
returnPath = nextMatch;
|
