Skip to content

Commit

Permalink
replace ServiceAnnotationBeanPostProcessor log.isInfoEnabled->log.isW…
Browse files Browse the repository at this point in the history
…arnEnabled (apache#2712)

simplify ExtensionLoader code segment
  • Loading branch information
vkeeper authored and CrazyHZM committed Dec 6, 2018
1 parent f6d2e43 commit d83f29b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -860,19 +860,8 @@ private String createAdaptiveExtensionClassCode() {
String[] value = adaptiveAnnotation.value();
// value is not set, use the value generated from class name as the key
if (value.length == 0) {
char[] charArray = type.getSimpleName().toCharArray();
StringBuilder sb = new StringBuilder(128);
for (int i = 0; i < charArray.length; i++) {
if (Character.isUpperCase(charArray[i])) {
if (i != 0) {
sb.append(".");
}
sb.append(Character.toLowerCase(charArray[i]));
} else {
sb.append(charArray[i]);
}
}
value = new String[]{sb.toString()};
String splitName = StringUtils.camelToSplitName(type.getSimpleName(), ".");
value = new String[]{splitName};
}

boolean hasInvocation = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private void registerServiceBean(BeanDefinitionHolder beanDefinitionHolder, Bean
if (scanner.checkCandidate(beanName, serviceBeanDefinition)) { // check duplicated candidate bean
registry.registerBeanDefinition(beanName, serviceBeanDefinition);

if (logger.isInfoEnabled()) {
if (logger.isWarnEnabled()) {
logger.warn("The BeanDefinition[" + serviceBeanDefinition +
"] of ServiceBean has been registered with name : " + beanName);
}
Expand Down

0 comments on commit d83f29b

Please sign in to comment.