From 6758d60cdcda8ada15ebc399f533a565320171a1 Mon Sep 17 00:00:00 2001 From: Yves Galante Date: Sat, 9 Sep 2017 12:48:24 +0200 Subject: [PATCH] Fix typo and remove unused import --- .../jsconf/core/ConfigurationFactory.java | 35 +++++++------------ .../jmob/jsconf/core/impl/BeanValidator.java | 4 +-- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/main/java/net/jmob/jsconf/core/ConfigurationFactory.java b/src/main/java/net/jmob/jsconf/core/ConfigurationFactory.java index 9cce677..4ae4765 100644 --- a/src/main/java/net/jmob/jsconf/core/ConfigurationFactory.java +++ b/src/main/java/net/jmob/jsconf/core/ConfigurationFactory.java @@ -16,16 +16,15 @@ package net.jmob.jsconf.core; -import static java.lang.String.format; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - +import com.typesafe.config.Config; +import com.typesafe.config.ConfigFactory; +import com.typesafe.config.ConfigParseOptions; +import com.typesafe.config.ConfigSyntax; +import net.jmob.jsconf.core.impl.BeanDefinition; +import net.jmob.jsconf.core.impl.BeanFactory; +import net.jmob.jsconf.core.impl.ProxyPostProcessor; +import net.jmob.jsconf.core.service.ClassPathScanningCandidate; +import net.jmob.jsconf.core.service.WatchResource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; @@ -37,19 +36,12 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; -import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.type.filter.AnnotationTypeFilter; -import com.typesafe.config.Config; -import com.typesafe.config.ConfigFactory; -import com.typesafe.config.ConfigParseOptions; -import com.typesafe.config.ConfigSyntax; +import java.util.*; +import java.util.Map.Entry; -import net.jmob.jsconf.core.impl.BeanDefinition; -import net.jmob.jsconf.core.impl.BeanFactory; -import net.jmob.jsconf.core.impl.ProxyPostProcessor; -import net.jmob.jsconf.core.service.ClassPathScanningCandidate; -import net.jmob.jsconf.core.service.WatchResource; +import static java.lang.String.format; public class ConfigurationFactory implements ApplicationContextAware, BeanFactoryPostProcessor, BeanPostProcessor { @@ -228,13 +220,12 @@ private void clearContext() { this.proxyBeanName.clear(); } - private String registerBean(BeanFactory beanBuilder) { + private void registerBean(BeanFactory beanBuilder) { String beanId = beanBuilder.registerBean(); if (beanBuilder.isReloading()) { this.proxyBeanName.add(beanId); } this.beanName.add(beanId); - return beanId; } private List withProfile(String name) { diff --git a/src/main/java/net/jmob/jsconf/core/impl/BeanValidator.java b/src/main/java/net/jmob/jsconf/core/impl/BeanValidator.java index 4baf22b..50ed576 100644 --- a/src/main/java/net/jmob/jsconf/core/impl/BeanValidator.java +++ b/src/main/java/net/jmob/jsconf/core/impl/BeanValidator.java @@ -38,9 +38,9 @@ class BeanValidator { ValidatorFactory f = null; try { f = Validation.buildDefaultValidatorFactory(); - log.debug("Vadliation factory builded"); + log.debug("Validation factory builded"); } catch (ValidationException e) { - log.debug("No vadliation factory found in classpath"); + log.debug("No validation factory found in classpath"); } finally { factory = f; }