diff --git a/src/main/java/com/ibm/as400/access/UserEnumeration.java b/src/main/java/com/ibm/as400/access/UserEnumeration.java index 3ed8db9d8..827108ede 100644 --- a/src/main/java/com/ibm/as400/access/UserEnumeration.java +++ b/src/main/java/com/ibm/as400/access/UserEnumeration.java @@ -18,7 +18,7 @@ // Helper class. Used to wrap the User[] with an Enumeration. // This class is used by UserList. -class UserEnumeration implements Enumeration +class UserEnumeration implements Enumeration { // The user list object from which to get the users. private UserList list_ = null; @@ -48,7 +48,7 @@ public final boolean hasMoreElements() return counter_ < length_; } - public final Object nextElement() + public final User nextElement() { if (counter_ >= length_) { diff --git a/src/main/java/com/ibm/as400/access/UserList.java b/src/main/java/com/ibm/as400/access/UserList.java index 0c7042b21..9e12ee388 100644 --- a/src/main/java/com/ibm/as400/access/UserList.java +++ b/src/main/java/com/ibm/as400/access/UserList.java @@ -20,7 +20,9 @@ import java.beans.VetoableChangeSupport; import java.io.IOException; import java.io.Serializable; +import java.util.Collections; import java.util.Enumeration; +import java.util.List; /** Represents a list of user profiles on the system. @@ -372,7 +374,7 @@ public String getUserProfile() @see #close @see #load **/ - public synchronized Enumeration getUsers() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, RequestNotSupportedException + public synchronized Enumeration getUsers() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException, RequestNotSupportedException { if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, "Retrieving user list."); // Need to get the length.