Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0-beta-2
-
None
-
n/a
Description
In our application, where we use Trinidad, we hit on the following exception...
Mar 10, 2011 1:25:33 PM org.apache.myfaces.trinidad.webapp.TrinidadFilter
SEVERE:
java.lang.NullPointerException
at org.apache.myfaces.trinidadinternal.skin.SkinUtils._registerSkinExtensionsA
ndAdditions(SkinUtils.java:379)
at org.apache.myfaces.trinidadinternal.skin.SkinUtils.registerSkinExtensions(S
kinUtils.java:129)
at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.init(Glob
alConfiguratorImpl.java:406)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.init(Registrat
ionFilter.java:53)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.init(Trinidad
FilterImpl.java:110)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.init(TrinidadFilter.java:
54)
The culprit code is here...
private static void _registerSkinExtensionsAndAdditions(
ExternalContext context,
SkinFactory skinFactory)
{
if (context == null)
return;
// Add META-INF/trinidad-skins.xml skins to skin factory. (sorted first to make sure
// we register the most 'base' skins first)
if (_LOG.isFine()) _LOG.fine("Parse META-INF/trinidad-skins.xml files");
List<SkinsNode> metaInfSkinsNodeList = _getMetaInfSkinsNodeList();
// Go through each SkinsNode object
// (contains List of SkinNodes and List of SkinAdditionNodes)
// and return a List of the SkinNodes.
List<SkinNode> metaInfSkinNodes = new ArrayList<SkinNode>();
for (SkinsNode skinsNode : metaInfSkinsNodeList)
----------------
addAll (from its doc) assumes that supplied collection is non-null. The supplier does not guarantee this, so we will need some defensive code here to avoid the NPE.
Will provide a patch.