Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.11-core
-
None
-
Java 1.5, Windos XP
Description
If I simulate a none-standard user agent in Firefox plugin "user agent switcher" (GoogleBot, Yahoo Slurp ....), I'm getting a NPE (see below)
I think this relates to Bug TRINIDAD-1109. Should it be reopened or is it a new issue?
Why not taking a default agent configuration to avoid a NPE?
java.lang.NullPointerException
at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache$Key.hashCode(FileSystemStyleCache.java:1213)
at java.util.Hashtable.get(Hashtable.java:336)
at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getEntry(FileSystemStyleCache.java:449)
at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getEntry(FileSystemStyleCache.java:421)
at org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache.getStyleSheetURIs(FileSystemStyleCache.java:163)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.StyleSheetRenderer.encodeAll(StyleSheetRenderer.java:91)
at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:335)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.HeadRenderer.encodeBegin(HeadRenderer.java:87)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeBegin(CoreRenderer.java:200)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeBegin(UIXComponentBase.java:660)
at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
at org.apache.myfaces.trinidad.webapp.UIXComponentTag.encodeBegin(UIXComponentTag.java:129)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:320)
at org.apache.myfaces.trinidad.webapp.UIXComponentTag.doStartTag(UIXComponentTag.java:104)
at org.apache.jsp.jsp.index_jsp._jspx_meth_trh_head_0(index_jsp.java:399)
at org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:151)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
Possible fix:
Why not define a non-null version string?
see fileSystemStyleCache:_init:1268
_version = (version == null) ? "0.0" : version;