Nullability fine-tuning based on IntelliJ IDEA 2018.3 inspection
Issue: SPR-15540
This commit is contained in:
@@ -393,6 +393,7 @@ class ConfigurationClassEnhancer {
|
||||
Object beanInstance = (useArgs ? beanFactory.getBean(beanName, beanMethodArgs) :
|
||||
beanFactory.getBean(beanName));
|
||||
if (!ClassUtils.isAssignableValue(beanMethod.getReturnType(), beanInstance)) {
|
||||
// Detect package-protected NullBean instance through equals(null) check
|
||||
if (beanInstance.equals(null)) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug(String.format("@Bean method %s.%s called as bean reference " +
|
||||
|
||||
@@ -170,11 +170,12 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport
|
||||
try {
|
||||
if (this.threaded) {
|
||||
// Start the connector server asynchronously (in a separate thread).
|
||||
final JMXConnectorServer serverToStart = this.connectorServer;
|
||||
Thread connectorThread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
connectorServer.start();
|
||||
serverToStart.start();
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new JmxException("Could not start JMX connector server after delay", ex);
|
||||
|
||||
Reference in New Issue
Block a user