ARTEMIS-5278 use pattern matching for instanceof

This commit is contained in:
Justin Bertram 2025-02-03 22:59:10 -06:00 committed by Robbie Gemmell
parent d587a077f6
commit 0082dfb01d
135 changed files with 148 additions and 310 deletions

View File

@ -473,11 +473,10 @@ public class LongHashSet extends AbstractSet<Long> implements Serializable {
return otherSet.containsMissingValue == containsMissingValue && otherSet.sizeOfArrayValues == sizeOfArrayValues && containsAll(otherSet);
}
if (!(other instanceof Set)) {
if (!(other instanceof Set<?> c)) {
return false;
}
final Set<?> c = (Set<?>) other;
if (c.size() != size()) {
return false;
}

View File

@ -166,8 +166,7 @@ public class FederationConfiguration implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Credentials)) return false;
Credentials that = (Credentials) o;
if (!(o instanceof Credentials that)) return false;
return Objects.equals(user, that.user) &&
Objects.equals(password, that.password);
}
@ -191,8 +190,7 @@ public class FederationConfiguration implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FederationConfiguration)) return false;
FederationConfiguration that = (FederationConfiguration) o;
if (!(o instanceof FederationConfiguration that)) return false;
return Objects.equals(name, that.name) &&
Objects.equals(credentials, that.credentials) &&
Objects.equals(upstreamConfigurations, that.upstreamConfigurations) &&

View File

@ -196,8 +196,7 @@ public class FederationAddressPolicyConfiguration implements FederationPolicy<Fe
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Matcher)) return false;
Matcher matcher = (Matcher) o;
if (!(o instanceof Matcher matcher)) return false;
return Objects.equals(addressMatch, matcher.addressMatch);
}
@ -219,8 +218,7 @@ public class FederationAddressPolicyConfiguration implements FederationPolicy<Fe
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FederationAddressPolicyConfiguration)) return false;
FederationAddressPolicyConfiguration that = (FederationAddressPolicyConfiguration) o;
if (!(o instanceof FederationAddressPolicyConfiguration that)) return false;
return maxHops == that.maxHops &&
Objects.equals(name, that.name) &&
Objects.equals(includes, that.includes) &&

View File

@ -65,8 +65,7 @@ public class FederationPolicySet implements FederationPolicy<FederationPolicySet
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FederationPolicySet)) return false;
FederationPolicySet that = (FederationPolicySet) o;
if (!(o instanceof FederationPolicySet that)) return false;
return Objects.equals(name, that.name) &&
Objects.equals(policyRefs, that.policyRefs);
}

View File

@ -167,8 +167,7 @@ public class FederationQueuePolicyConfiguration implements FederationPolicy<Fede
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Matcher)) return false;
Matcher matcher = (Matcher) o;
if (!(o instanceof Matcher matcher)) return false;
return Objects.equals(queueMatch, matcher.queueMatch) &&
Objects.equals(addressMatch, matcher.addressMatch);
}
@ -192,8 +191,7 @@ public class FederationQueuePolicyConfiguration implements FederationPolicy<Fede
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FederationQueuePolicyConfiguration)) return false;
FederationQueuePolicyConfiguration that = (FederationQueuePolicyConfiguration) o;
if (!(o instanceof FederationQueuePolicyConfiguration that)) return false;
return includeFederated == that.includeFederated &&
Objects.equals(name, that.name) &&
Objects.equals(includes, that.includes) &&

View File

@ -70,9 +70,8 @@ public abstract class FederationStreamConfiguration <T extends FederationStreamC
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof FederationStreamConfiguration))
if (!(o instanceof FederationStreamConfiguration that))
return false;
FederationStreamConfiguration that = (FederationStreamConfiguration) o;
return Objects.equals(name, that.name) && Objects.equals(connectionConfiguration, that.connectionConfiguration) && Objects.equals(policyRefs, that.policyRefs);
}

View File

@ -53,8 +53,7 @@ public class FederationTransformerConfiguration implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FederationTransformerConfiguration)) return false;
FederationTransformerConfiguration that = (FederationTransformerConfiguration) o;
if (!(o instanceof FederationTransformerConfiguration that)) return false;
return Objects.equals(name, that.name) &&
Objects.equals(transformerConfiguration, that.transformerConfiguration);
}

View File

@ -461,10 +461,9 @@ public class PacketImpl implements Packet {
if (this == obj) {
return true;
}
if (!(obj instanceof PacketImpl)) {
if (!(obj instanceof PacketImpl other)) {
return false;
}
PacketImpl other = (PacketImpl) obj;
return (channelID == other.channelID) && (size == other.size) && (type != other.type);
}

View File

@ -80,10 +80,9 @@ public class ActiveMQExceptionMessage extends PacketImpl {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof ActiveMQExceptionMessage)) {
if (!(obj instanceof ActiveMQExceptionMessage other)) {
return false;
}
ActiveMQExceptionMessage other = (ActiveMQExceptionMessage) obj;
if (exception == null) {
if (other.exception != null) {
return false;

View File

@ -80,10 +80,9 @@ public class ActiveMQExceptionMessage_V2 extends ActiveMQExceptionMessage {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof ActiveMQExceptionMessage_V2)) {
if (!(obj instanceof ActiveMQExceptionMessage_V2 other)) {
return false;
}
ActiveMQExceptionMessage_V2 other = (ActiveMQExceptionMessage_V2) obj;
if (correlationID != other.correlationID) {
return false;
}

View File

@ -157,10 +157,9 @@ public class ClusterTopologyChangeMessage extends PacketImpl {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof ClusterTopologyChangeMessage)) {
if (!(obj instanceof ClusterTopologyChangeMessage other)) {
return false;
}
ClusterTopologyChangeMessage other = (ClusterTopologyChangeMessage) obj;
if (exit != other.exit) {
return false;
}

View File

@ -159,10 +159,9 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof ClusterTopologyChangeMessage_V2)) {
if (!(obj instanceof ClusterTopologyChangeMessage_V2 other)) {
return false;
}
ClusterTopologyChangeMessage_V2 other = (ClusterTopologyChangeMessage_V2) obj;
if (uniqueEventID != other.uniqueEventID) {
return false;
}

View File

@ -110,10 +110,9 @@ public class ClusterTopologyChangeMessage_V3 extends ClusterTopologyChangeMessag
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof ClusterTopologyChangeMessage_V3)) {
if (!(obj instanceof ClusterTopologyChangeMessage_V3 other)) {
return false;
}
ClusterTopologyChangeMessage_V3 other = (ClusterTopologyChangeMessage_V3) obj;
if (scaleDownGroupName == null) {
if (other.scaleDownGroupName != null) {
return false;

View File

@ -81,10 +81,9 @@ public class ClusterTopologyChangeMessage_V4 extends ClusterTopologyChangeMessag
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof ClusterTopologyChangeMessage_V4)) {
if (!(obj instanceof ClusterTopologyChangeMessage_V4 other)) {
return false;
}
ClusterTopologyChangeMessage_V4 other = (ClusterTopologyChangeMessage_V4) obj;
return serverVersion == other.serverVersion;
}
}

View File

@ -123,9 +123,8 @@ public class CreateAddressMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof CreateAddressMessage))
if (!(obj instanceof CreateAddressMessage other))
return false;
CreateAddressMessage other = (CreateAddressMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -161,9 +161,8 @@ public class CreateQueueMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof CreateQueueMessage))
if (!(obj instanceof CreateQueueMessage other))
return false;
CreateQueueMessage other = (CreateQueueMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -484,9 +484,8 @@ public class CreateQueueMessage_V2 extends CreateQueueMessage {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof CreateQueueMessage_V2))
if (!(obj instanceof CreateQueueMessage_V2 other))
return false;
CreateQueueMessage_V2 other = (CreateQueueMessage_V2) obj;
if (autoCreated != other.autoCreated)
return false;
if (maxConsumers != other.maxConsumers)

View File

@ -236,9 +236,8 @@ public class CreateSessionMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof CreateSessionMessage))
if (!(obj instanceof CreateSessionMessage other))
return false;
CreateSessionMessage other = (CreateSessionMessage) obj;
if (autoCommitAcks != other.autoCommitAcks)
return false;
if (autoCommitSends != other.autoCommitSends)

View File

@ -86,10 +86,9 @@ public class CreateSessionMessage_V2 extends CreateSessionMessage {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof CreateSessionMessage_V2)) {
if (!(obj instanceof CreateSessionMessage_V2 other)) {
return false;
}
CreateSessionMessage_V2 other = (CreateSessionMessage_V2) obj;
if (clientID == null) {
if (other.clientID != null)
return false;

View File

@ -71,9 +71,8 @@ public class CreateSessionResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof CreateSessionResponseMessage))
if (!(obj instanceof CreateSessionResponseMessage other))
return false;
CreateSessionResponseMessage other = (CreateSessionResponseMessage) obj;
if (serverVersion != other.serverVersion)
return false;
return true;

View File

@ -134,9 +134,8 @@ public class CreateSharedQueueMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof CreateSharedQueueMessage))
if (!(obj instanceof CreateSharedQueueMessage other))
return false;
CreateSharedQueueMessage other = (CreateSharedQueueMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -425,9 +425,8 @@ public class CreateSharedQueueMessage_V2 extends CreateSharedQueueMessage {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof CreateSharedQueueMessage_V2))
if (!(obj instanceof CreateSharedQueueMessage_V2 other))
return false;
CreateSharedQueueMessage_V2 other = (CreateSharedQueueMessage_V2) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -82,10 +82,9 @@ public class DisconnectMessage extends PacketImpl {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof DisconnectMessage)) {
if (!(obj instanceof DisconnectMessage other)) {
return false;
}
DisconnectMessage other = (DisconnectMessage) obj;
if (nodeID == null) {
if (other.nodeID != null) {
return false;

View File

@ -75,10 +75,9 @@ public class DisconnectMessage_V2 extends DisconnectMessage {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof DisconnectMessage_V2)) {
if (!(obj instanceof DisconnectMessage_V2 other)) {
return false;
}
DisconnectMessage_V2 other = (DisconnectMessage_V2) obj;
if (scaleDownNodeID == null) {
if (other.scaleDownNodeID != null) {
return false;

View File

@ -113,10 +113,9 @@ public class DisconnectMessage_V3 extends DisconnectMessage {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof DisconnectMessage_V3)) {
if (!(obj instanceof DisconnectMessage_V3 other)) {
return false;
}
DisconnectMessage_V3 other = (DisconnectMessage_V3) obj;
if (reason == null) {
if (other.reason != null)
return false;

View File

@ -89,10 +89,9 @@ public class NullResponseMessage_V2 extends NullResponseMessage {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof NullResponseMessage_V2)) {
if (!(obj instanceof NullResponseMessage_V2 other)) {
return false;
}
NullResponseMessage_V2 other = (NullResponseMessage_V2) obj;
if (correlationID != other.correlationID) {
return false;
}

View File

@ -73,10 +73,9 @@ public class PacketsConfirmedMessage extends PacketImpl {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof PacketsConfirmedMessage)) {
if (!(obj instanceof PacketsConfirmedMessage other)) {
return false;
}
PacketsConfirmedMessage other = (PacketsConfirmedMessage) obj;
if (commandID != other.commandID) {
return false;
}

View File

@ -85,10 +85,9 @@ public final class Ping extends PacketImpl {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof Ping)) {
if (!(obj instanceof Ping other)) {
return false;
}
Ping other = (Ping) obj;
if (connectionTTL != other.connectionTTL) {
return false;
}

View File

@ -85,9 +85,8 @@ public class ReattachSessionMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof ReattachSessionMessage))
if (!(obj instanceof ReattachSessionMessage other))
return false;
ReattachSessionMessage other = (ReattachSessionMessage) obj;
if (lastConfirmedCommandID != other.lastConfirmedCommandID)
return false;
if (name == null) {

View File

@ -90,9 +90,8 @@ public class ReattachSessionResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof ReattachSessionResponseMessage))
if (!(obj instanceof ReattachSessionResponseMessage other))
return false;
ReattachSessionResponseMessage other = (ReattachSessionResponseMessage) obj;
if (lastConfirmedCommandID != other.lastConfirmedCommandID)
return false;
if (reattached != other.reattached)

View File

@ -78,9 +78,8 @@ public class RollbackMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof RollbackMessage))
if (!(obj instanceof RollbackMessage other))
return false;
RollbackMessage other = (RollbackMessage) obj;
if (considerLastMessageAsDelivered != other.considerLastMessageAsDelivered)
return false;
return true;

View File

@ -97,9 +97,8 @@ public class SessionAcknowledgeMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionAcknowledgeMessage))
if (!(obj instanceof SessionAcknowledgeMessage other))
return false;
SessionAcknowledgeMessage other = (SessionAcknowledgeMessage) obj;
if (consumerID != other.consumerID)
return false;
if (messageID != other.messageID)

View File

@ -87,9 +87,8 @@ public class SessionAddMetaDataMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionAddMetaDataMessage))
if (!(obj instanceof SessionAddMetaDataMessage other))
return false;
SessionAddMetaDataMessage other = (SessionAddMetaDataMessage) obj;
if (data == null) {
if (other.data != null)
return false;

View File

@ -113,9 +113,8 @@ public class SessionAddMetaDataMessageV2 extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionAddMetaDataMessageV2))
if (!(obj instanceof SessionAddMetaDataMessageV2 other))
return false;
SessionAddMetaDataMessageV2 other = (SessionAddMetaDataMessageV2) obj;
if (data == null) {
if (other.data != null)
return false;

View File

@ -63,9 +63,8 @@ public class SessionBindingQueryMessage extends QueueAbstractPacket {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionBindingQueryMessage))
if (!(obj instanceof SessionBindingQueryMessage other))
return false;
SessionBindingQueryMessage other = (SessionBindingQueryMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -103,9 +103,8 @@ public class SessionBindingQueryResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionBindingQueryResponseMessage))
if (!(obj instanceof SessionBindingQueryResponseMessage other))
return false;
SessionBindingQueryResponseMessage other = (SessionBindingQueryResponseMessage) obj;
if (exists != other.exists)
return false;
if (queueNames == null) {

View File

@ -82,9 +82,8 @@ public class SessionBindingQueryResponseMessage_V2 extends SessionBindingQueryRe
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionBindingQueryResponseMessage_V2))
if (!(obj instanceof SessionBindingQueryResponseMessage_V2 other))
return false;
SessionBindingQueryResponseMessage_V2 other = (SessionBindingQueryResponseMessage_V2) obj;
if (autoCreateQueues != other.autoCreateQueues)
return false;
return true;

View File

@ -85,9 +85,8 @@ public class SessionBindingQueryResponseMessage_V3 extends SessionBindingQueryRe
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionBindingQueryResponseMessage_V3))
if (!(obj instanceof SessionBindingQueryResponseMessage_V3 other))
return false;
SessionBindingQueryResponseMessage_V3 other = (SessionBindingQueryResponseMessage_V3) obj;
if (autoCreateAddresses != other.autoCreateAddresses)
return false;
return true;

View File

@ -184,9 +184,8 @@ public class SessionBindingQueryResponseMessage_V4 extends SessionBindingQueryRe
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionBindingQueryResponseMessage_V4))
if (!(obj instanceof SessionBindingQueryResponseMessage_V4 other))
return false;
SessionBindingQueryResponseMessage_V4 other = (SessionBindingQueryResponseMessage_V4) obj;
if (defaultPurgeOnNoConsumers != other.defaultPurgeOnNoConsumers)
return false;
if (defaultMaxConsumers != other.defaultMaxConsumers)

View File

@ -125,10 +125,9 @@ public class SessionBindingQueryResponseMessage_V5 extends SessionBindingQueryRe
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof SessionBindingQueryResponseMessage_V5)) {
if (!(obj instanceof SessionBindingQueryResponseMessage_V5 other)) {
return false;
}
SessionBindingQueryResponseMessage_V5 other = (SessionBindingQueryResponseMessage_V5) obj;
if (supportsMulticast != other.supportsMulticast) {
return false;
}

View File

@ -75,10 +75,9 @@ public class SessionCommitMessage_V2 extends SessionCommitMessage {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof SessionCommitMessage_V2)) {
if (!(obj instanceof SessionCommitMessage_V2 other)) {
return false;
}
SessionCommitMessage_V2 other = (SessionCommitMessage_V2) obj;
if (correlationID != other.correlationID) {
return false;
}

View File

@ -66,9 +66,8 @@ public class SessionConsumerCloseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionConsumerCloseMessage))
if (!(obj instanceof SessionConsumerCloseMessage other))
return false;
SessionConsumerCloseMessage other = (SessionConsumerCloseMessage) obj;
if (consumerID != other.consumerID)
return false;
return true;

View File

@ -74,9 +74,8 @@ public class SessionConsumerFlowCreditMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionConsumerFlowCreditMessage))
if (!(obj instanceof SessionConsumerFlowCreditMessage other))
return false;
SessionConsumerFlowCreditMessage other = (SessionConsumerFlowCreditMessage) obj;
if (consumerID != other.consumerID)
return false;
if (credits != other.credits)

View File

@ -112,9 +112,8 @@ public abstract class SessionContinuationMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionContinuationMessage))
if (!(obj instanceof SessionContinuationMessage other))
return false;
SessionContinuationMessage other = (SessionContinuationMessage) obj;
if (!Arrays.equals(body, other.body))
return false;
if (continues != other.continues)

View File

@ -149,9 +149,8 @@ public class SessionCreateConsumerMessage extends QueueAbstractPacket {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionCreateConsumerMessage))
if (!(obj instanceof SessionCreateConsumerMessage other))
return false;
SessionCreateConsumerMessage other = (SessionCreateConsumerMessage) obj;
if (browseOnly != other.browseOnly)
return false;
if (filterString == null) {

View File

@ -69,9 +69,8 @@ public class SessionDeleteQueueMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionDeleteQueueMessage))
if (!(obj instanceof SessionDeleteQueueMessage other))
return false;
SessionDeleteQueueMessage other = (SessionDeleteQueueMessage) obj;
if (queueName == null) {
if (other.queueName != null)
return false;

View File

@ -84,9 +84,8 @@ public class SessionExpireMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionExpireMessage))
if (!(obj instanceof SessionExpireMessage other))
return false;
SessionExpireMessage other = (SessionExpireMessage) obj;
if (consumerID != other.consumerID)
return false;
if (messageID != other.messageID)

View File

@ -81,9 +81,8 @@ public class SessionForceConsumerDelivery extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionForceConsumerDelivery))
if (!(obj instanceof SessionForceConsumerDelivery other))
return false;
SessionForceConsumerDelivery other = (SessionForceConsumerDelivery) obj;
if (consumerID != other.consumerID)
return false;
if (sequence != other.sequence)

View File

@ -101,9 +101,8 @@ public class SessionIndividualAcknowledgeMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionIndividualAcknowledgeMessage))
if (!(obj instanceof SessionIndividualAcknowledgeMessage other))
return false;
SessionIndividualAcknowledgeMessage other = (SessionIndividualAcknowledgeMessage) obj;
if (consumerID != other.consumerID)
return false;
if (messageID != other.messageID)

View File

@ -81,9 +81,8 @@ public class SessionProducerCreditsFailMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionProducerCreditsFailMessage))
if (!(obj instanceof SessionProducerCreditsFailMessage other))
return false;
SessionProducerCreditsFailMessage other = (SessionProducerCreditsFailMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -81,9 +81,8 @@ public class SessionProducerCreditsMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionProducerCreditsMessage))
if (!(obj instanceof SessionProducerCreditsMessage other))
return false;
SessionProducerCreditsMessage other = (SessionProducerCreditsMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -62,9 +62,8 @@ public class SessionQueueQueryMessage extends QueueAbstractPacket {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionQueueQueryMessage))
if (!(obj instanceof SessionQueueQueryMessage other))
return false;
SessionQueueQueryMessage other = (SessionQueueQueryMessage) obj;
if (queueName == null) {
if (other.queueName != null)
return false;

View File

@ -180,9 +180,8 @@ public class SessionQueueQueryResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionQueueQueryResponseMessage))
if (!(obj instanceof SessionQueueQueryResponseMessage other))
return false;
SessionQueueQueryResponseMessage other = (SessionQueueQueryResponseMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -109,9 +109,8 @@ public class SessionQueueQueryResponseMessage_V2 extends SessionQueueQueryRespon
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionQueueQueryResponseMessage_V2))
if (!(obj instanceof SessionQueueQueryResponseMessage_V2 other))
return false;
SessionQueueQueryResponseMessage_V2 other = (SessionQueueQueryResponseMessage_V2) obj;
if (autoCreateQueues != other.autoCreateQueues)
return false;
return true;

View File

@ -460,9 +460,8 @@ public class SessionQueueQueryResponseMessage_V3 extends SessionQueueQueryRespon
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionQueueQueryResponseMessage_V3))
if (!(obj instanceof SessionQueueQueryResponseMessage_V3 other))
return false;
SessionQueueQueryResponseMessage_V3 other = (SessionQueueQueryResponseMessage_V3) obj;
if (autoCreated != other.autoCreated)
return false;
if (purgeOnNoConsumers != other.purgeOnNoConsumers)

View File

@ -110,9 +110,8 @@ public class SessionReceiveContinuationMessage extends SessionContinuationMessag
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionReceiveContinuationMessage))
if (!(obj instanceof SessionReceiveContinuationMessage other))
return false;
SessionReceiveContinuationMessage other = (SessionReceiveContinuationMessage) obj;
if (consumerID != other.consumerID)
return false;
return true;

View File

@ -130,9 +130,8 @@ public class SessionReceiveLargeMessage extends PacketImpl implements MessagePac
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionReceiveLargeMessage))
if (!(obj instanceof SessionReceiveLargeMessage other))
return false;
SessionReceiveLargeMessage other = (SessionReceiveLargeMessage) obj;
if (consumerID != other.consumerID)
return false;
if (deliveryCount != other.deliveryCount)

View File

@ -100,9 +100,8 @@ public class SessionReceiveMessage extends MessagePacket {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionReceiveMessage))
if (!(obj instanceof SessionReceiveMessage other))
return false;
SessionReceiveMessage other = (SessionReceiveMessage) obj;
if (consumerID != other.consumerID)
return false;
if (deliveryCount != other.deliveryCount)

View File

@ -86,9 +86,8 @@ public class SessionRequestProducerCreditsMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionRequestProducerCreditsMessage))
if (!(obj instanceof SessionRequestProducerCreditsMessage other))
return false;
SessionRequestProducerCreditsMessage other = (SessionRequestProducerCreditsMessage) obj;
if (address == null) {
if (other.address != null)
return false;

View File

@ -162,9 +162,8 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionSendContinuationMessage))
if (!(obj instanceof SessionSendContinuationMessage other))
return false;
SessionSendContinuationMessage other = (SessionSendContinuationMessage) obj;
if (message == null) {
if (other.message != null)
return false;

View File

@ -110,9 +110,8 @@ public class SessionSendContinuationMessage_V2 extends SessionSendContinuationMe
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionSendContinuationMessage_V2))
if (!(obj instanceof SessionSendContinuationMessage_V2 other))
return false;
SessionSendContinuationMessage_V2 other = (SessionSendContinuationMessage_V2) obj;
if (correlationID != other.correlationID)
return false;
return true;

View File

@ -81,9 +81,8 @@ public class SessionSendLargeMessage extends PacketImpl implements MessagePacket
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionSendLargeMessage))
if (!(obj instanceof SessionSendLargeMessage other))
return false;
SessionSendLargeMessage other = (SessionSendLargeMessage) obj;
if (largeMessage == null) {
if (other.largeMessage != null)
return false;

View File

@ -128,9 +128,8 @@ public class SessionSendMessage extends MessagePacket {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionSendMessage))
if (!(obj instanceof SessionSendMessage other))
return false;
SessionSendMessage other = (SessionSendMessage) obj;
if (requiresResponse != other.requiresResponse)
return false;
return true;

View File

@ -92,9 +92,8 @@ public class SessionSendMessage_V2 extends SessionSendMessage {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionSendMessage_V2))
if (!(obj instanceof SessionSendMessage_V2 other))
return false;
SessionSendMessage_V2 other = (SessionSendMessage_V2) obj;
if (correlationID != other.correlationID)
return false;
return true;

View File

@ -76,9 +76,8 @@ public class SessionXAAfterFailedMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAAfterFailedMessage))
if (!(obj instanceof SessionXAAfterFailedMessage other))
return false;
SessionXAAfterFailedMessage other = (SessionXAAfterFailedMessage) obj;
if (xid == null) {
if (other.xid != null)
return false;

View File

@ -79,9 +79,8 @@ public class SessionXACommitMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXACommitMessage))
if (!(obj instanceof SessionXACommitMessage other))
return false;
SessionXACommitMessage other = (SessionXACommitMessage) obj;
if (onePhase != other.onePhase)
return false;
if (xid == null) {

View File

@ -80,9 +80,8 @@ public class SessionXAEndMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAEndMessage))
if (!(obj instanceof SessionXAEndMessage other))
return false;
SessionXAEndMessage other = (SessionXAEndMessage) obj;
if (failed != other.failed)
return false;
if (xid == null) {

View File

@ -71,9 +71,8 @@ public class SessionXAForgetMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAForgetMessage))
if (!(obj instanceof SessionXAForgetMessage other))
return false;
SessionXAForgetMessage other = (SessionXAForgetMessage) obj;
if (xid == null) {
if (other.xid != null)
return false;

View File

@ -89,9 +89,8 @@ public class SessionXAGetInDoubtXidsResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAGetInDoubtXidsResponseMessage))
if (!(obj instanceof SessionXAGetInDoubtXidsResponseMessage other))
return false;
SessionXAGetInDoubtXidsResponseMessage other = (SessionXAGetInDoubtXidsResponseMessage) obj;
if (xids == null) {
if (other.xids != null)
return false;

View File

@ -73,9 +73,8 @@ public class SessionXAGetTimeoutResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAGetTimeoutResponseMessage))
if (!(obj instanceof SessionXAGetTimeoutResponseMessage other))
return false;
SessionXAGetTimeoutResponseMessage other = (SessionXAGetTimeoutResponseMessage) obj;
if (timeoutSeconds != other.timeoutSeconds)
return false;
return true;

View File

@ -71,9 +71,8 @@ public class SessionXAJoinMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAJoinMessage))
if (!(obj instanceof SessionXAJoinMessage other))
return false;
SessionXAJoinMessage other = (SessionXAJoinMessage) obj;
if (xid == null) {
if (other.xid != null)
return false;

View File

@ -71,9 +71,8 @@ public class SessionXAPrepareMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAPrepareMessage))
if (!(obj instanceof SessionXAPrepareMessage other))
return false;
SessionXAPrepareMessage other = (SessionXAPrepareMessage) obj;
if (xid == null) {
if (other.xid != null)
return false;

View File

@ -98,9 +98,8 @@ public class SessionXAResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAResponseMessage))
if (!(obj instanceof SessionXAResponseMessage other))
return false;
SessionXAResponseMessage other = (SessionXAResponseMessage) obj;
if (error != other.error)
return false;
if (message == null) {

View File

@ -89,10 +89,9 @@ public class SessionXAResponseMessage_V2 extends SessionXAResponseMessage {
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof SessionXAResponseMessage_V2)) {
if (!(obj instanceof SessionXAResponseMessage_V2 other)) {
return false;
}
SessionXAResponseMessage_V2 other = (SessionXAResponseMessage_V2) obj;
if (correlationID != other.correlationID) {
return false;
}

View File

@ -71,9 +71,8 @@ public class SessionXAResumeMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAResumeMessage))
if (!(obj instanceof SessionXAResumeMessage other))
return false;
SessionXAResumeMessage other = (SessionXAResumeMessage) obj;
if (xid == null) {
if (other.xid != null)
return false;

View File

@ -71,9 +71,8 @@ public class SessionXARollbackMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXARollbackMessage))
if (!(obj instanceof SessionXARollbackMessage other))
return false;
SessionXARollbackMessage other = (SessionXARollbackMessage) obj;
if (xid == null) {
if (other.xid != null)
return false;

View File

@ -68,9 +68,8 @@ public class SessionXASetTimeoutMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXASetTimeoutMessage))
if (!(obj instanceof SessionXASetTimeoutMessage other))
return false;
SessionXASetTimeoutMessage other = (SessionXASetTimeoutMessage) obj;
if (timeoutSeconds != other.timeoutSeconds)
return false;
return true;

View File

@ -73,9 +73,8 @@ public class SessionXASetTimeoutResponseMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXASetTimeoutResponseMessage))
if (!(obj instanceof SessionXASetTimeoutResponseMessage other))
return false;
SessionXASetTimeoutResponseMessage other = (SessionXASetTimeoutResponseMessage) obj;
if (ok != other.ok)
return false;
return true;

View File

@ -73,9 +73,8 @@ public class SessionXAStartMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SessionXAStartMessage))
if (!(obj instanceof SessionXAStartMessage other))
return false;
SessionXAStartMessage other = (SessionXAStartMessage) obj;
if (xid == null) {
if (other.xid != null)
return false;

View File

@ -78,9 +78,8 @@ public class SubscribeClusterTopologyUpdatesMessage extends PacketImpl {
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SubscribeClusterTopologyUpdatesMessage))
if (!(obj instanceof SubscribeClusterTopologyUpdatesMessage other))
return false;
SubscribeClusterTopologyUpdatesMessage other = (SubscribeClusterTopologyUpdatesMessage) obj;
if (clusterConnection != other.clusterConnection)
return false;
return true;

View File

@ -72,9 +72,8 @@ public class SubscribeClusterTopologyUpdatesMessageV2 extends SubscribeClusterTo
return true;
if (!super.equals(obj))
return false;
if (!(obj instanceof SubscribeClusterTopologyUpdatesMessageV2))
if (!(obj instanceof SubscribeClusterTopologyUpdatesMessageV2 other))
return false;
SubscribeClusterTopologyUpdatesMessageV2 other = (SubscribeClusterTopologyUpdatesMessageV2) obj;
if (clientVersion != other.clientVersion)
return false;
return true;

View File

@ -115,10 +115,9 @@ public class XidImpl implements Xid, Serializable {
if (this == other) {
return true;
}
if (!(other instanceof Xid)) {
if (!(other instanceof Xid xother)) {
return false;
}
Xid xother = (Xid) other;
if (xother.getFormatId() != formatId) {
return false;
}

View File

@ -121,10 +121,9 @@ public class VersionImpl implements Version, Serializable {
if (obj == null) {
return false;
}
if (!(obj instanceof VersionImpl)) {
if (!(obj instanceof VersionImpl other)) {
return false;
}
VersionImpl other = (VersionImpl) obj;
if (!Arrays.equals(compatibleVersionList, other.compatibleVersionList)) {
return false;
}

View File

@ -490,12 +490,10 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
return true;
}
if (!(o instanceof ActiveMQDestination)) {
if (!(o instanceof ActiveMQDestination that)) {
return false;
}
ActiveMQDestination that = (ActiveMQDestination) o;
return simpleAddress.equals(that.simpleAddress);
}

View File

@ -80,12 +80,10 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
return true;
}
if (!(o instanceof ActiveMQQueue)) {
if (!(o instanceof ActiveMQQueue that)) {
return false;
}
ActiveMQQueue that = (ActiveMQQueue) o;
return super.getAddress().equals(that.getAddress());
}

View File

@ -467,12 +467,10 @@ public class ActiveMQSession implements QueueSession, TopicSession {
throw new InvalidDestinationException("Cannot create a consumer with a null destination");
}
if (!(destination instanceof ActiveMQDestination)) {
if (!(destination instanceof ActiveMQDestination jbdest)) {
throw new InvalidDestinationException("Not an ActiveMQDestination:" + destination);
}
ActiveMQDestination jbdest = (ActiveMQDestination) destination;
if (jbdest.isTemporary() && !connection.containsTemporaryQueue(jbdest.getSimpleAddress())) {
throw new JMSException("Can not create consumer for temporary destination " + destination +
" from another JMS connection");
@ -586,15 +584,13 @@ public class ActiveMQSession implements QueueSession, TopicSession {
throw new IllegalStateException("Cannot create a durable subscriber on a QueueSession");
}
checkTopic(topic);
if (!(topic instanceof ActiveMQDestination)) {
if (!(topic instanceof ActiveMQDestination jbdest)) {
throw new InvalidDestinationException("Not an ActiveMQTopic:" + topic);
}
if ("".equals(messageSelector)) {
messageSelector = null;
}
ActiveMQDestination jbdest = (ActiveMQDestination) topic;
if (jbdest.isQueue()) {
throw new InvalidDestinationException("Cannot create a subscriber on a queue");
}
@ -983,7 +979,7 @@ public class ActiveMQSession implements QueueSession, TopicSession {
if (queue == null) {
throw new InvalidDestinationException("Cannot create a browser with a null queue");
}
if (!(queue instanceof ActiveMQDestination)) {
if (!(queue instanceof ActiveMQDestination activeMQDestination)) {
throw new InvalidDestinationException("Not an ActiveMQQueue:" + queue);
}
if ("".equals(filterString)) {
@ -999,8 +995,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
throw JMSExceptionHelper.convertFromActiveMQException(ActiveMQJMSClientBundle.BUNDLE.invalidFilter(SimpleString.of(filterString), e));
}
ActiveMQDestination activeMQDestination = (ActiveMQDestination) queue;
if (!activeMQDestination.isQueue()) {
throw new InvalidDestinationException("Cannot create a browser on a topic");
}

View File

@ -54,12 +54,10 @@ public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQu
return true;
}
if (!(o instanceof ActiveMQTemporaryQueue)) {
if (!(o instanceof ActiveMQTemporaryQueue that)) {
return false;
}
ActiveMQTemporaryQueue that = (ActiveMQTemporaryQueue) o;
return super.getAddress().equals(that.getAddress());
}

View File

@ -39,12 +39,10 @@ public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTo
return true;
}
if (!(o instanceof ActiveMQTemporaryTopic)) {
if (!(o instanceof ActiveMQTemporaryTopic that)) {
return false;
}
ActiveMQTemporaryTopic that = (ActiveMQTemporaryTopic) o;
return super.getAddress().equals(that.getAddress());
}

View File

@ -79,12 +79,10 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
return true;
}
if (!(o instanceof ActiveMQTopic)) {
if (!(o instanceof ActiveMQTopic that)) {
return false;
}
ActiveMQTopic that = (ActiveMQTopic) o;
return super.getAddress().equals(that.getAddress());
}

View File

@ -38,10 +38,10 @@ public class JMSTransactionDetail extends TransactionDetail {
@Override
public String decodeMessageType(Message msg) {
if (!(msg instanceof ICoreMessage)) {
if (!(msg instanceof ICoreMessage coreMessage)) {
return "N/A";
}
return switch (((ICoreMessage) msg).getType()) {
return switch (coreMessage.getType()) {
case ActiveMQMessage.TYPE -> "Default"; // 0
case ActiveMQObjectMessage.TYPE -> "ObjectMessage"; // 2
case ActiveMQTextMessage.TYPE -> "TextMessage"; // 3

View File

@ -73,10 +73,9 @@ public class RecordInfo {
@Override
public boolean equals(final Object other) {
if (!(other instanceof RecordInfo)) {
if (!(other instanceof RecordInfo r)) {
return false;
}
RecordInfo r = (RecordInfo) other;
return r.id == id;
}

View File

@ -332,8 +332,7 @@ public class LogAnnotationProcessor extends AbstractProcessor {
}
if (parameterType instanceof DeclaredType declaredType) {
if (declaredType.asElement() instanceof TypeElement) {
TypeElement theElement = (TypeElement) declaredType.asElement();
if (declaredType.asElement() instanceof TypeElement theElement) {
if (DEBUG) {
debug("... ... recursively inspecting super class for Exception on " + parameterClazz + ", looking at superClass " + theElement.getSuperclass());
}

View File

@ -228,8 +228,7 @@ public class ArtemisDependencyDocPlugin extends ArtemisAbstractPlugin {
private String getURI(ArtifactResult result) {
Artifact art = result.getArtifact();
String uri = "";
if (result.getRepository() instanceof RemoteRepository) {
RemoteRepository remoteRepository = (RemoteRepository) result.getRepository();
if (result.getRepository() instanceof RemoteRepository remoteRepository) {
uri = remoteRepository.getUrl();
} else {
uri = defaultRepo;

View File

@ -412,7 +412,7 @@ public class AMQPStandardMessage extends AMQPMessage {
@Override
public String getStringBody() {
final Section body = getBody();
if (body instanceof AmqpValue value && ((AmqpValue) body).getValue() instanceof String) {
if (body instanceof AmqpValue value && value.getValue() instanceof String) {
return (String) value.getValue();
} else {
return null;

View File

@ -140,13 +140,11 @@ public final class AMQPFederationEventSupport {
public static Map<String, Object> decodeQueueAddedEvent(AMQPMessage message) throws ActiveMQException {
final Section body = message.getBody();
if (!(body instanceof AmqpValue)) {
if (!(body instanceof AmqpValue bodyValue)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body was not an AmqpValue type");
}
final AmqpValue bodyValue = (AmqpValue) body;
if (!(bodyValue.getValue() instanceof Map)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body AmqpValue did not carry an encoded Map");
@ -190,13 +188,11 @@ public final class AMQPFederationEventSupport {
public static Map<String, Object> decodeAddressAddedEvent(AMQPMessage message) throws ActiveMQException {
final Section body = message.getBody();
if (!(body instanceof AmqpValue)) {
if (!(body instanceof AmqpValue bodyValue)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body was not an AmqpValue type");
}
final AmqpValue bodyValue = (AmqpValue) body;
if (!(bodyValue.getValue() instanceof Map)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body AmqpValue did not carry an encoded Map");

View File

@ -132,12 +132,10 @@ public class AMQPFederationGenericConsumerInfo implements FederationConsumerInfo
return true;
}
if (!(o instanceof AMQPFederationGenericConsumerInfo)) {
if (!(o instanceof AMQPFederationGenericConsumerInfo that)) {
return false;
}
final AMQPFederationGenericConsumerInfo that = (AMQPFederationGenericConsumerInfo) o;
return role == that.role &&
priority == that.priority &&
Objects.equals(address, that.address) &&

View File

@ -271,13 +271,11 @@ public final class AMQPFederationPolicySupport {
public static FederationReceiveFromQueuePolicy decodeReceiveFromQueuePolicy(AMQPMessage message, WildcardConfiguration wildcardConfig) throws ActiveMQException {
final Section body = message.getBody();
if (!(body instanceof AmqpValue)) {
if (!(body instanceof AmqpValue bodyValue)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body was not an AmqpValue type");
}
final AmqpValue bodyValue = (AmqpValue) body;
if (bodyValue.getValue() == null || !(bodyValue.getValue() instanceof Map)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body AmqpValue did not carry an encoded Map");
@ -386,13 +384,11 @@ public final class AMQPFederationPolicySupport {
public static FederationReceiveFromAddressPolicy decodeReceiveFromAddressPolicy(AMQPMessage message, WildcardConfiguration wildcardConfig) throws ActiveMQException {
final Section body = message.getBody();
if (!(body instanceof AmqpValue)) {
if (!(body instanceof AmqpValue bodyValue)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body was not an AmqpValue type");
}
final AmqpValue bodyValue = (AmqpValue) body;
if (bodyValue.getValue() == null || !(bodyValue.getValue() instanceof Map)) {
throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.malformedFederationControlMessage(
"Message body AmqpValue did not carry an encoded Map");

View File

@ -408,8 +408,7 @@ public class AMQPConnectionContext extends ProtonInitializable implements EventH
link.setTarget(link.getRemoteTarget());
if (link instanceof Receiver receiver) {
if (link.getRemoteTarget() instanceof Coordinator) {
Coordinator coordinator = (Coordinator) link.getRemoteTarget();
if (link.getRemoteTarget() instanceof Coordinator coordinator) {
protonSession.addTransactionHandler(coordinator, receiver);
} else if (isReplicaTarget(receiver)) {
handleReplicaTargetLinkOpened(protonSession, receiver);

View File

@ -198,8 +198,7 @@ public class AmqpSupport {
}
for (Map.Entry<Symbol, Object> filter : filters.entrySet()) {
if (filter.getValue() instanceof DescribedType) {
DescribedType describedType = ((DescribedType) filter.getValue());
if (filter.getValue() instanceof DescribedType describedType) {
Object descriptor = describedType.getDescriptor();
for (Object filterId : filterIds) {

View File

@ -451,8 +451,7 @@ public abstract class ProtonAbstractReceiver extends ProtonInitializable impleme
receiver.advance();
Transaction tx = null;
if (delivery.getRemoteState() instanceof TransactionalState) {
TransactionalState txState = (TransactionalState) delivery.getRemoteState();
if (delivery.getRemoteState() instanceof TransactionalState txState) {
try {
tx = this.sessionSPI.getTransaction(txState.getTxnId(), false);
} catch (Exception e) {

Some files were not shown because too many files have changed in this diff Show More