Browse Source

Polishing

6.1.x
Juergen Hoeller 9 months ago
parent
commit
4645ce60c8
  1. 4
      spring-core/src/main/java/org/springframework/objenesis/SpringObjenesis.java
  2. 3
      spring-jms/src/main/java/org/springframework/jms/config/AbstractJmsListenerContainerFactory.java
  3. 18
      spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java

4
spring-core/src/main/java/org/springframework/objenesis/SpringObjenesis.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2021 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -69,7 +69,7 @@ public class SpringObjenesis implements Objenesis {
this.strategy = (strategy != null ? strategy : new StdInstantiatorStrategy()); this.strategy = (strategy != null ? strategy : new StdInstantiatorStrategy());
// Evaluate the "spring.objenesis.ignore" property upfront... // Evaluate the "spring.objenesis.ignore" property upfront...
if (SpringProperties.getFlag(SpringObjenesis.IGNORE_OBJENESIS_PROPERTY_NAME)) { if (SpringProperties.getFlag(IGNORE_OBJENESIS_PROPERTY_NAME)) {
this.worthTrying = Boolean.FALSE; this.worthTrying = Boolean.FALSE;
} }
} }

3
spring-jms/src/main/java/org/springframework/jms/config/AbstractJmsListenerContainerFactory.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -209,6 +209,7 @@ public abstract class AbstractJmsListenerContainerFactory<C extends AbstractMess
this.observationRegistry = observationRegistry; this.observationRegistry = observationRegistry;
} }
@Override @Override
public C createListenerContainer(JmsListenerEndpoint endpoint) { public C createListenerContainer(JmsListenerEndpoint endpoint) {
C instance = createContainerInstance(); C instance = createContainerInstance();

18
spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2023 the original author or authors. * Copyright 2002-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -102,7 +102,7 @@ import org.springframework.util.ErrorHandler;
* (i.e. after your business logic executed but before the JMS part got committed), * (i.e. after your business logic executed but before the JMS part got committed),
* so duplicate message detection is just there to cover a corner case. * so duplicate message detection is just there to cover a corner case.
* <li>Or wrap your <i>entire processing with an XA transaction</i>, covering the * <li>Or wrap your <i>entire processing with an XA transaction</i>, covering the
* reception of the JMS message as well as the execution of the business logic in * receipt of the JMS message as well as the execution of the business logic in
* your message listener (including database operations etc). This is only * your message listener (including database operations etc). This is only
* supported by {@link DefaultMessageListenerContainer}, through specifying * supported by {@link DefaultMessageListenerContainer}, through specifying
* an external "transactionManager" (typically a * an external "transactionManager" (typically a
@ -152,7 +152,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
implements MessageListenerContainer { implements MessageListenerContainer {
private static final boolean micrometerJakartaPresent = ClassUtils.isPresent( private static final boolean micrometerJakartaPresent = ClassUtils.isPresent(
"io.micrometer.jakarta9.instrument.jms.JmsInstrumentation", AbstractMessageListenerContainer.class.getClassLoader()); "io.micrometer.jakarta9.instrument.jms.JmsInstrumentation",
AbstractMessageListenerContainer.class.getClassLoader());
@Nullable @Nullable
private volatile Object destination; private volatile Object destination;
@ -170,14 +171,14 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
@Nullable @Nullable
private String subscriptionName; private String subscriptionName;
private boolean pubSubNoLocal = false;
@Nullable @Nullable
private Boolean replyPubSubDomain; private Boolean replyPubSubDomain;
@Nullable @Nullable
private QosSettings replyQosSettings; private QosSettings replyQosSettings;
private boolean pubSubNoLocal = false;
@Nullable @Nullable
private MessageConverter messageConverter; private MessageConverter messageConverter;
@ -500,12 +501,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
*/ */
@Override @Override
public boolean isReplyPubSubDomain() { public boolean isReplyPubSubDomain() {
if (this.replyPubSubDomain != null) { return (this.replyPubSubDomain != null ? this.replyPubSubDomain : isPubSubDomain());
return this.replyPubSubDomain;
}
else {
return isPubSubDomain();
}
} }
/** /**

Loading…
Cancel
Save