summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/Path.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/Path.java')
-rw-r--r--src/main/java/com/c2kernel/lookup/Path.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/java/com/c2kernel/lookup/Path.java b/src/main/java/com/c2kernel/lookup/Path.java
index 3390007..8196d4d 100644
--- a/src/main/java/com/c2kernel/lookup/Path.java
+++ b/src/main/java/com/c2kernel/lookup/Path.java
@@ -13,12 +13,11 @@ package com.c2kernel.lookup;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.Iterator;
import java.util.StringTokenizer;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.process.Gateway;
-import com.novell.ldap.LDAPConnection;
-import com.novell.ldap.LDAPSearchConstraints;
/**
@@ -51,10 +50,6 @@ public abstract class Path implements Serializable
//
// needed for unusual subclass constructors
- protected static String mGlobalPath; //cern.ch
- protected static String mRootPath; //cristal2
- protected static String mLocalPath; //lab27
-
public Path() {
}
@@ -241,10 +236,10 @@ public abstract class Path implements Serializable
}
public Path find(String name) throws ObjectNotFoundException {
- Enumeration<Path> e = Gateway.getLookup().search(this, name);
- if (e.hasMoreElements()) {
- Path thisPath = e.nextElement();
- if (e.hasMoreElements())
+ Iterator<Path> e = Gateway.getLookup().search(this, name);
+ if (e.hasNext()) {
+ Path thisPath = e.next();
+ if (e.hasNext())
throw new ObjectNotFoundException("More than one match for "+name, "");
return thisPath;
}