You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2007/06/01 01:50:43 UTC

svn commit: r543316 - /myfaces/trinidad/branches/faces-1_2-070522/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java

Author: jwaldman
Date: Thu May 31 16:50:42 2007
New Revision: 543316

URL: http://svn.apache.org/viewvc?view=rev&rev=543316
Log:
TRINIDAD-45 NPE at CSSGenerationUtils._hasNamespace for faces-1_2-070522 branch
Fixed the null pointer exception in CSSGenerationUtils.java

Modified:
    myfaces/trinidad/branches/faces-1_2-070522/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java

Modified: myfaces/trinidad/branches/faces-1_2-070522/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/faces-1_2-070522/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java?view=diff&rev=543316&r1=543315&r2=543316
==============================================================================
--- myfaces/trinidad/branches/faces-1_2-070522/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java (original)
+++ myfaces/trinidad/branches/faces-1_2-070522/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java Thu May 31 16:50:42 2007
@@ -225,6 +225,10 @@
           {
             String shortSelector = _getShortSelector(mappedSelector,
                                                      shortStyleClassMap);
+            if (shortSelector == null)
+            {
+              shortSelector = mappedSelector;
+            }
 
             // run it through a shortener one more time to shorten any
             // of the af component selectors.
@@ -915,6 +919,7 @@
     String   selector,
     String[] nsPrefixArray)
   {
+    if (selector == null) return false;
     boolean hasNamespacePrefix = false;
     int numNamespaces = nsPrefixArray.length;
     for (int i=0; (i <  numNamespaces )&& !hasNamespacePrefix; i++)