store can be null for a temp q, npe will hide out of sync error message, observed once in AMQ2102Test

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@903225 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2010-01-26 13:59:27 +00:00
parent b85b71e297
commit def2a34915
1 changed files with 6 additions and 3 deletions

View File

@ -591,9 +591,12 @@ public class Queue extends BaseDestination implements Task, UsageListener {
} }
Message loadMessage(MessageId messageId) throws IOException { Message loadMessage(MessageId messageId) throws IOException {
Message msg = store.getMessage(messageId); Message msg = null;
if (msg != null) { if (store != null) { // can be null for a temp q
msg.setRegionDestination(this); msg = store.getMessage(messageId);
if (msg != null) {
msg.setRegionDestination(this);
}
} }
return msg; return msg;
} }