Commit 8bfbf37aa361b631092fd844fb11e0a3f4433448
1 parent
dea8f195
Exists in
master
O carregamento de configuração acusava erro ao tentar carregar classes
Showing
1 changed file
with
7 additions
and
2 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/ConfigurationClassValueExtractor.java
... | ... | @@ -45,15 +45,20 @@ import org.apache.commons.configuration.Configuration; |
45 | 45 | import br.gov.frameworkdemoiselle.annotation.Priority; |
46 | 46 | import br.gov.frameworkdemoiselle.configuration.ConfigurationValueExtractor; |
47 | 47 | import br.gov.frameworkdemoiselle.util.Reflections; |
48 | -import br.gov.frameworkdemoiselle.util.Strings; | |
49 | 48 | |
50 | 49 | @Priority(EXTENSIONS_L1_PRIORITY) |
51 | 50 | public class ConfigurationClassValueExtractor implements ConfigurationValueExtractor { |
52 | 51 | |
53 | 52 | @Override |
54 | 53 | public Object getValue(String prefix, String key, Field field, Configuration configuration) throws Exception { |
54 | + Object value = null; | |
55 | 55 | String canonicalName = configuration.getString(prefix + key); |
56 | - return Reflections.forName(canonicalName); | |
56 | + | |
57 | + if (canonicalName != null) { | |
58 | + value = Reflections.forName(canonicalName); | |
59 | + } | |
60 | + | |
61 | + return value; | |
57 | 62 | } |
58 | 63 | |
59 | 64 | @Override | ... | ... |