This closes #2305
This commit is contained in:
commit
b73ff1b48e
|
@ -223,7 +223,7 @@ public final class Page implements Comparable<Page> {
|
|||
|
||||
public synchronized void write(final PagedMessage message) throws Exception {
|
||||
if (!file.isOpen()) {
|
||||
return;
|
||||
throw ActiveMQMessageBundle.BUNDLE.cannotWriteToClosedFile(file);
|
||||
}
|
||||
final int messageEncodedSize = message.getEncodeSize();
|
||||
final int bufferSize = messageEncodedSize + Page.SIZE_RECORD;
|
||||
|
|
|
@ -44,6 +44,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQUnexpectedRoutingTypeForAddr
|
|||
import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
|
||||
import org.apache.activemq.artemis.api.core.RoutingType;
|
||||
import org.apache.activemq.artemis.api.core.SimpleString;
|
||||
import org.apache.activemq.artemis.core.io.SequentialFile;
|
||||
import org.apache.activemq.artemis.core.postoffice.Binding;
|
||||
import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage;
|
||||
import org.apache.activemq.artemis.core.security.CheckType;
|
||||
|
@ -444,4 +445,8 @@ public interface ActiveMQMessageBundle {
|
|||
|
||||
@Message(id = 229216, value = "Invalid queue name: {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||
ActiveMQIllegalStateException invalidQueueName(SimpleString queueName);
|
||||
|
||||
@Message(id = 119217, value = "Can't write to closed file: {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||
ActiveMQIOErrorException cannotWriteToClosedFile(SequentialFile file);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue