You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/11/18 22:07:56 UTC
svn commit: r1036630 -
/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java
Author: lofwyr
Date: Thu Nov 18 21:07:56 2010
New Revision: 1036630
URL: http://svn.apache.org/viewvc?rev=1036630&view=rev
Log:
avoid Exception page when a script is not found for tc:script: logging only
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java?rev=1036630&r1=1036629&r2=1036630&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java Thu Nov 18 21:07:56 2010
@@ -465,7 +465,7 @@ public class ResourceManagerImpl impleme
}
private String[] getStrings(FacesContext facesContext, String name, String type) {
- String[] result = null;
+ String[] result = new String[0];
if (name != null) {
int dot = name.lastIndexOf('.');
if (dot == -1) {
@@ -474,14 +474,16 @@ public class ResourceManagerImpl impleme
ClientPropertiesKey key = ClientPropertiesKey.get(facesContext);
MiscCacheKey miscKey = new MiscCacheKey(key, name);
- result = miscCache.get(miscKey);
- if (result != null) {
- return result;
+ String[] cacheResult = miscCache.get(miscKey);
+ if (cacheResult != null) {
+ return cacheResult;
}
try {
List matches = getPaths(key, "", type,
name.substring(0, dot), name.substring(dot), true, false, true, null, true, false);
- result = (String[]) matches.toArray(new String[matches.size()]);
+ if (matches != null) {
+ result = (String[]) matches.toArray(new String[matches.size()]);
+ }
miscCache.put(miscKey, result);
} catch (Exception e) {
LOG.error("name = '" + name + "' clientProperties = '" + key.toString() + "'", e);