isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1228845 - /incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java
Date Sun, 08 Jan 2012 13:50:53 GMT
Author: danhaywood
Date: Sun Jan  8 13:50:53 2012
New Revision: 1228845

URL: http://svn.apache.org/viewvc?rev=1228845&view=rev
Log:
ISIS-165: minor refactoring (no change in functionality)

Modified:
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java

Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java?rev=1228845&r1=1228844&r2=1228845&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java
(original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/config/IsisConfigurationBuilderResourceStreams.java
Sun Jan  8 13:50:53 2012
@@ -86,16 +86,7 @@ public class IsisConfigurationBuilderRes
     // Constructor, initialization
     // ////////////////////////////////////////////////////////////
 
-    public IsisConfigurationBuilderResourceStreams() {
-        this(ResourceStreamSourceFileSystem.create(ConfigurationConstants.DEFAULT_CONFIG_DIRECTORY));
-    }
-
-    public IsisConfigurationBuilderResourceStreams(final ResourceStreamSource resourceStreamSource)
{
-        this.resourceStreamSource = resourceStreamSource;
-        addDefaultConfigurationResources();
-    }
-
-    public IsisConfigurationBuilderResourceStreams(final ResourceStreamSource... resourceStreamSources)
{
+    private static ResourceStreamSource createComposite(final ResourceStreamSource... resourceStreamSources)
{
         final ResourceStreamSourceComposite composite = new ResourceStreamSourceComposite();
         for (final ResourceStreamSource rss : resourceStreamSources) {
             if (rss == null) {
@@ -103,7 +94,19 @@ public class IsisConfigurationBuilderRes
             }
             composite.addResourceStreamSource(rss);
         }
-        this.resourceStreamSource = composite;
+        return composite;
+    }
+
+    public IsisConfigurationBuilderResourceStreams() {
+        this(ResourceStreamSourceFileSystem.create(ConfigurationConstants.DEFAULT_CONFIG_DIRECTORY));
+    }
+
+    public IsisConfigurationBuilderResourceStreams(final ResourceStreamSource... resourceStreamSources)
{
+        this(createComposite(resourceStreamSources));
+    }
+
+    public IsisConfigurationBuilderResourceStreams(final ResourceStreamSource resourceStreamSource)
{
+        this.resourceStreamSource = resourceStreamSource;
         addDefaultConfigurationResources();
     }
 



Mime
View raw message