[
https://issues.apache.org/jira/browse/TRINIDAD-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899117#action_12899117
]
Jeanne Waldman commented on TRINIDAD-1885:
------------------------------------------
This is only for zh-CN language.
<!--
We don't specify a font family for CJK languages, since most browsers
(Netscape, ICE, IE) seem to have problems displaying CJK text with
our default font-family list (Arial, Helvetica, etc...). We're better
off letting the font-family default. (However - that just causes
still more problems on Windows Netscape 4 - so we've got more overrides
below for that specific case.
-->
<style name="AFDefaultFontFamily">
<property name="font-family"/>
</style>
<!-- The following selector should have been called ::close-icon-style, since
it is a style,
not an Icon. It's too late to change since it is public. -->
<style selector="af|dialog::close-icon">
<includeStyle name="AFDefaultFont"/>
<includeStyle name="AFMediumFont"/>
<property name="margin-left">5px</property>
<property name="background-image">url('/adf/images/close.gif')</property>
<property name="background-position">center</property>
<property name="background-repeat">no-repeat</property>
<property name="height">13px</property>
<property name="width">13px</property>
</style>
I
In the extended skin, we are using af|dialog::close-icon like it is an Icon
Object, and setting content.
We are merging in this base-desktop.xss's af|dialog::close-icon which is
misnamed and really should be close-icon-style.
Then AFDefaultFont's font-family's value is null.
And this exposes the code in StyleSheetDocument._createIconFromNode to a NPE,
which should be protected against.
The fix is very simple - add "&& propertyValue != null" in _createIconFromNode.
if (propertyName != null && propertyValue != null)
> NPE in StyleSheetDocument._create IconFromNode
> ----------------------------------------------
>
> Key: TRINIDAD-1885
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1885
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Skinning
> Affects Versions: 2.0.0.3-core
> Reporter: Jeanne Waldman
> Assignee: Jeanne Waldman
>
> If you create a skin and you have this definition:
> af|dialog::close-icon {content: inhibit}
> Then you will get a NPE.
> java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:881)
> at
> org.apache.myfaces.trinidadinternal.style.BaseStyle.setProperty(BaseStyle.java
> :141)
> at
> org.apache.myfaces.trinidadinternal.style.CSSStyle.setProperty(CSSStyle.java:1
> 17)
> at
> org.apache.myfaces.trinidadinternal.style.xml.parse.StyleSheetDocument._create
> IconFromNode(StyleSheetDocument.java:373)
> at
> org.apache.myfaces.trinidadinternal.style.xml.parse.StyleSheetDocument.getIcon
> s(StyleSheetDocument.java:264)
> at
> org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getStyle
> ContextResolvedIcons(FileSystemStyleCache.java:642)
> This bug showed up when TRINIDAD-17 was fixed.
> TRINIDAD-17 Need to support mapping icons via -tr-rule-ref like we do with
> styles
> was checked in August 5, 2010
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.