You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2006/01/31 01:16:34 UTC
svn commit: r373641 -
/struts/shale/trunk/core-library/src/java/org/apache/shale/util/LoadBundle.java
Author: craigmcc
Date: Mon Jan 30 16:16:30 2006
New Revision: 373641
URL: http://svn.apache.org/viewcvs?rev=373641&view=rev
Log:
At design time, make getMap() return an empty map, if basename == null,
rather than throwing an exception.
Modified:
struts/shale/trunk/core-library/src/java/org/apache/shale/util/LoadBundle.java
Modified: struts/shale/trunk/core-library/src/java/org/apache/shale/util/LoadBundle.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/util/LoadBundle.java?rev=373641&r1=373640&r2=373641&view=diff
==============================================================================
--- struts/shale/trunk/core-library/src/java/org/apache/shale/util/LoadBundle.java (original)
+++ struts/shale/trunk/core-library/src/java/org/apache/shale/util/LoadBundle.java Mon Jan 30 16:16:30 2006
@@ -16,8 +16,10 @@
package org.apache.shale.util;
+import java.beans.Beans;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
@@ -140,6 +142,9 @@
// Validate our current state
if (basename == null) {
+ if (Beans.isDesignTime()) {
+ return Collections.EMPTY_MAP;
+ }
throw new IllegalStateException("The 'basename' property cannot be null"); // FIXME - i18n
}
FacesContext context = FacesContext.getCurrentInstance();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org