Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeSafety added - Issue fixed #40 #88

Merged
merged 2 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/ibm/as400/access/MessageQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public boolean getListDirection()
@exception IOException If an error occurs while communicating with the system.
@exception ObjectDoesNotExistException If the object does not exist on the system.
**/
public Enumeration getMessages() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
public Enumeration<QueuedMessage> getMessages() throws AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
{
if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, "Retrieving message queue message list.");
// Need to get the length.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.NoSuchElementException;

// Helper class. Used to wrap the QueuedMessage[] with an Enumeration. This class is used by MessageQueue and JobLog.
class QueuedMessageEnumeration implements Enumeration
class QueuedMessageEnumeration implements Enumeration<QueuedMessage>
{
private QueuedMessage[] messageCache_;

Expand Down Expand Up @@ -51,12 +51,13 @@ class QueuedMessageEnumeration implements Enumeration
numMessages_ = length;
}

@Override
public final boolean hasMoreElements()
{
return counter_ < numMessages_;
}

public final Object nextElement()
@Override
public final QueuedMessage nextElement()
{
if (counter_ >= numMessages_)
{
Expand Down