myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash Udupa (JIRA)" <>
Subject [jira] [Created] (TRINIDAD-2421) NullPointerException when property not resolvable through -tr-property-ref
Date Fri, 18 Oct 2013 15:44:41 GMT
Prakash Udupa created TRINIDAD-2421:

             Summary: NullPointerException when property not resolvable through -tr-property-ref
                 Key: TRINIDAD-2421
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Skinning
    Affects Versions: 2.0.1-core
            Reporter: Prakash Udupa

The bug:
Suppose in an application's skin file there is a selector definition with a custom skin property
'-tr-cjk-font-family' like the following:

-tr-cjk-font-family: -tr-property-ref("tr|mySelector","font-family");

...and then "font-family" is not defined anywhere for the selector "tr|mySelector". This will
lead to the following NPE...

at java.util.concurrent.ConcurrentHashMap.put( 




And when this NPE happens, applications are completely broken.

It is perfectly fine for a property to not resolve through tr-property-ref due to missing
dependencies, it is the skinning framework code that should handle this case gracefully. We
should just not try to add a null value to ConcurrentHashMap in the above code path.

I'll attach a patch with simple code addition that does a not-null check to cover this case.

This message was sent by Atlassian JIRA

View raw message