Commits

Anonymous committed 9e943d1

Fixing broken unittests for webwork 2.2.3
o baseConfigPackageConfig may be null: better handling of NPEs

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/xwork_1-2@1068e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/config/impl/DefaultConfiguration.java

         
         Map results = new TreeMap();
         if (baseConfig.getPackageName().equals(packageContext.getName())) {
-        	results = new TreeMap(packageContext.getAllGlobalResults());
+        	results.putAll(packageContext.getAllGlobalResults());
         	results.putAll(baseConfig.getResults());
         }
         else {
             PackageConfig baseConfigPackageConfig = (PackageConfig) packageContexts.get(baseConfig.getPackageName());
-            results = new TreeMap(baseConfigPackageConfig.getAllGlobalResults());
+            if ( baseConfigPackageConfig != null) {
+                results.putAll(baseConfigPackageConfig.getAllGlobalResults());
+            }
             results.putAll(baseConfig.getResults());
         }