You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by sb...@apache.org on 2018/02/06 18:29:54 UTC
[streams] branch STREAMS-580 updated: class-hierarchy inheritance >
package-hierarchy inheritance
This is an automated email from the ASF dual-hosted git repository.
sblackmon pushed a commit to branch STREAMS-580
in repository https://gitbox.apache.org/repos/asf/streams.git
The following commit(s) were added to refs/heads/STREAMS-580 by this push:
new bd7992c class-hierarchy inheritance > package-hierarchy inheritance
bd7992c is described below
commit bd7992c1394f680be0ec2af49935275d007762be
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
AuthorDate: Tue Feb 6 12:24:40 2018 -0600
class-hierarchy inheritance > package-hierarchy inheritance
---
.../streams/config/ComponentConfigurator.java | 29 +++++++++++-----------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/streams-config/src/main/java/org/apache/streams/config/ComponentConfigurator.java b/streams-config/src/main/java/org/apache/streams/config/ComponentConfigurator.java
index aa17d36..e8f8760 100644
--- a/streams-config/src/main/java/org/apache/streams/config/ComponentConfigurator.java
+++ b/streams-config/src/main/java/org/apache/streams/config/ComponentConfigurator.java
@@ -75,20 +75,6 @@ public class ComponentConfigurator<T extends Serializable> {
Config cascadeConfig = null;
- List<Class> superclasses = getSuperClasses(configClass);
-
- for( Class superclass : superclasses) {
- String superclassCanonicalName = superclass.getCanonicalName();
- if( rootConfig.hasPath(superclassCanonicalName)) {
- Config superclassConfig = rootConfig.getConfig(superclassCanonicalName);
- if (cascadeConfig == null) {
- cascadeConfig = superclassConfig;
- } else {
- cascadeConfig = superclassConfig.withFallback(cascadeConfig);
- }
- }
- }
-
String[] canonicalNameParts = StringUtils.split(configClass.getCanonicalName(), '.');
for( int partIndex = 1; partIndex < canonicalNameParts.length; partIndex++) {
@@ -108,6 +94,21 @@ public class ComponentConfigurator<T extends Serializable> {
}
+ List<Class> superclasses = getSuperClasses(configClass);
+
+ for( Class superclass : superclasses) {
+ String superclassCanonicalName = superclass.getCanonicalName();
+ if( rootConfig.hasPath(superclassCanonicalName)) {
+ Config superclassConfig = rootConfig.getConfig(superclassCanonicalName);
+ if (cascadeConfig == null) {
+ cascadeConfig = superclassConfig;
+ } else {
+ cascadeConfig = superclassConfig.withFallback(cascadeConfig);
+ }
+ }
+ }
+
+
if( rootConfig.hasPath(configClass.getSimpleName()) ) {
Config simpleNameConfig = rootConfig.getConfig(configClass.getSimpleName());
if( cascadeConfig == null ) {
--
To stop receiving notification emails like this one, please contact
sblackmon@apache.org.