Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -77,7 +77,7 @@ public class AutoProxyRegistrar implements ImportBeanDefinitionRegistrar {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!candidateFound) {
|
||||
if (!candidateFound && logger.isWarnEnabled()) {
|
||||
String name = getClass().getSimpleName();
|
||||
logger.warn(String.format("%s was imported but no annotations were found " +
|
||||
"having both 'mode' and 'proxyTargetClass' attributes of type " +
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -209,7 +209,9 @@ public class MBeanRegistrationSupport {
|
||||
registeredBean = this.server.registerMBean(mbean, objectName);
|
||||
}
|
||||
catch (InstanceNotFoundException ex2) {
|
||||
logger.error("Unable to replace existing MBean at [" + objectName + "]", ex2);
|
||||
if (logger.isErrorEnabled()) {
|
||||
logger.error("Unable to replace existing MBean at [" + objectName + "]", ex2);
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
@@ -239,9 +241,9 @@ public class MBeanRegistrationSupport {
|
||||
}
|
||||
if (!snapshot.isEmpty()) {
|
||||
logger.info("Unregistering JMX-exposed beans");
|
||||
}
|
||||
for (ObjectName objectName : snapshot) {
|
||||
doUnregister(objectName);
|
||||
for (ObjectName objectName : snapshot) {
|
||||
doUnregister(objectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -436,8 +436,8 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
|
||||
}
|
||||
catch (NotBoundException ex) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("RMI service '" + this.serviceName + "' is not bound to registry"
|
||||
+ (this.createdRegistry ? (" at port '" + this.registryPort + "' anymore") : ""), ex);
|
||||
logger.warn("RMI service '" + this.serviceName + "' is not bound to registry" +
|
||||
(this.createdRegistry ? (" at port '" + this.registryPort + "' anymore") : ""), ex);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
@@ -454,8 +454,9 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
|
||||
}
|
||||
catch (NoSuchObjectException ex) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("RMI object for service '" + this.serviceName + "' isn't exported anymore", ex);
|
||||
logger.warn("RMI object for service '" + this.serviceName + "' is not exported anymore", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -79,13 +79,13 @@ public abstract class RemoteInvocationBasedExporter extends RemoteExporter {
|
||||
}
|
||||
catch (NoSuchMethodException ex) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.warn("Could not find target method for " + invocation, ex);
|
||||
logger.debug("Could not find target method for " + invocation, ex);
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
catch (IllegalAccessException ex) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.warn("Could not access target method for " + invocation, ex);
|
||||
logger.debug("Could not access target method for " + invocation, ex);
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user