mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-07 10:38:44 +00:00
ARTEMIS-2320 'while' statement does not loop
This commit is contained in:
parent
b33874488b
commit
781e4c460d
@ -3748,16 +3748,12 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
||||
}
|
||||
|
||||
}
|
||||
while (true) {
|
||||
if (messagesIterator != null && messagesIterator.hasNext()) {
|
||||
MessageReference msg = messagesIterator.next();
|
||||
if (msg.isPaged()) {
|
||||
previouslyBrowsed.add(((PagedReference) msg).getPosition());
|
||||
}
|
||||
return msg;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (getPagingIterator() != null) {
|
||||
while (getPagingIterator().hasNext()) {
|
||||
|
@ -48,9 +48,8 @@ public class SpawnedJMSServer {
|
||||
|
||||
System.out.println("OK");
|
||||
|
||||
String line = null;
|
||||
while ((line = br.readLine()) != null) {
|
||||
if ("STOP".equals(line.trim())) {
|
||||
String line = br.readLine();
|
||||
if (line != null && "STOP".equals(line.trim())) {
|
||||
stopServer();
|
||||
System.out.println("Server stopped");
|
||||
System.exit(0);
|
||||
@ -58,7 +57,6 @@ public class SpawnedJMSServer {
|
||||
// stop anyway but with an error status
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
String allStack = t.getCause().getMessage() + "|";
|
||||
|
Loading…
x
Reference in New Issue
Block a user