struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [28/33] struts git commit: Inlines and simplifies
Date Mon, 28 Sep 2015 18:53:17 GMT
Inlines and simplifies


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d511d282
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d511d282
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d511d282

Branch: refs/heads/master
Commit: d511d282045fa30aee3f994c7fdac78c600cc417
Parents: 2940761
Author: Lukasz Lenart <lukasz.lenart@gmail.com>
Authored: Tue Sep 8 08:31:40 2015 +0200
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Tue Sep 8 08:31:40 2015 +0200

----------------------------------------------------------------------
 .../xwork2/config/entities/PackageConfig.java             | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/d511d282/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
index 10286c4..e5d3ef4 100644
--- a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
+++ b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
@@ -614,19 +614,15 @@ public class PackageConfig extends Located implements Comparable, Serializable,
         }
 
         public PackageConfig build() {
-            embalmTarget();
-            PackageConfig result = target;
-            target = new PackageConfig(result);
-            return result;
-        }
-
-        protected void embalmTarget() {
             target.actionConfigs = Collections.unmodifiableMap(target.actionConfigs);
             target.globalResultConfigs = Collections.unmodifiableMap(target.globalResultConfigs);
             target.interceptorConfigs = Collections.unmodifiableMap(target.interceptorConfigs);
             target.resultTypeConfigs = Collections.unmodifiableMap(target.resultTypeConfigs);
             target.globalExceptionMappingConfigs = Collections.unmodifiableList(target.globalExceptionMappingConfigs);
             target.parents = Collections.unmodifiableList(target.parents);
+            PackageConfig result = target;
+            target = new PackageConfig(result);
+            return result;
         }
 
         @Override


Mime
View raw message