提交 59ef34d7 编写于 作者: J Juergen Hoeller

Polishing

上级 5dbbd8fe
......@@ -45,44 +45,42 @@ public class AspectJWeaverMessageHandler implements IMessageHandler {
private static final String AJ_ID = "[AspectJ] ";
private static final Log LOGGER = LogFactory.getLog("AspectJ Weaver");
private static final Log logger = LogFactory.getLog("AspectJ Weaver");
@Override
public boolean handleMessage(IMessage message) throws AbortException {
Kind messageKind = message.getKind();
if (messageKind == IMessage.DEBUG) {
if (LOGGER.isDebugEnabled() || LOGGER.isTraceEnabled()) {
LOGGER.debug(makeMessageFor(message));
if (logger.isDebugEnabled()) {
logger.debug(makeMessageFor(message));
return true;
}
}
else if ((messageKind == IMessage.INFO) || (messageKind == IMessage.WEAVEINFO)) {
if (LOGGER.isInfoEnabled()) {
LOGGER.info(makeMessageFor(message));
else if (messageKind == IMessage.INFO || messageKind == IMessage.WEAVEINFO) {
if (logger.isInfoEnabled()) {
logger.info(makeMessageFor(message));
return true;
}
}
else if (messageKind == IMessage.WARNING) {
if (LOGGER.isWarnEnabled()) {
LOGGER.warn(makeMessageFor(message));
if (logger.isWarnEnabled()) {
logger.warn(makeMessageFor(message));
return true;
}
}
else if (messageKind == IMessage.ERROR) {
if (LOGGER.isErrorEnabled()) {
LOGGER.error(makeMessageFor(message));
if (logger.isErrorEnabled()) {
logger.error(makeMessageFor(message));
return true;
}
}
else if (messageKind == IMessage.ABORT) {
if (LOGGER.isFatalEnabled()) {
LOGGER.fatal(makeMessageFor(message));
if (logger.isFatalEnabled()) {
logger.fatal(makeMessageFor(message));
return true;
}
}
return false;
}
......
......@@ -171,6 +171,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
setParentBeanFactory(parentBeanFactory);
}
/**
* Set the instantiation strategy to use for creating bean instances.
* Default is CglibSubclassingInstantiationStrategy.
......@@ -261,7 +262,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
this.ignoredDependencyInterfaces.add(ifc);
}
@Override
public void copyConfigurationFrom(ConfigurableBeanFactory otherFactory) {
super.copyConfigurationFrom(otherFactory);
......@@ -352,10 +352,8 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
else {
Object bean;
final BeanFactory parent = this;
if (System.getSecurityManager() != null) {
bean = AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
return getInstantiationStrategy().instantiate(bd, null, parent);
......@@ -365,7 +363,6 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
else {
bean = getInstantiationStrategy().instantiate(bd, null, parent);
}
populateBean(beanClass.getName(), bd, new BeanWrapperImpl(bean));
return bean;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册