ARTEMIS-4734 mitigate NPE in ReplicationManager
This commit is contained in:
parent
379515382e
commit
934fe24e5c
|
@ -462,6 +462,9 @@ public final class ReplicationManager implements ActiveMQComponent {
|
|||
}
|
||||
|
||||
final OperationContext repliToken = OperationContextImpl.getContext(ioExecutorFactory);
|
||||
if (repliToken == null) {
|
||||
throw ActiveMQMessageBundle.BUNDLE.replicationFailureRepliTokenNull(packet.toString(), ioExecutorFactory.toString());
|
||||
}
|
||||
if (lineUp) {
|
||||
repliToken.replicationLineUp();
|
||||
}
|
||||
|
|
|
@ -548,4 +548,7 @@ public interface ActiveMQMessageBundle {
|
|||
|
||||
@Message(id = 229252, value = "Invalid HAPolicy property: {}")
|
||||
RuntimeException unsupportedHAPolicyPropertyType(String invalidHAPolicy);
|
||||
|
||||
@Message(id = 229253, value = "Unable to acquire OperationContext when replicating packet: {}. ExecutorFactory: {}")
|
||||
IllegalStateException replicationFailureRepliTokenNull(String packet, String executorFactory);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue