myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1793828 - in /myfaces/tobago/trunk/tobago-core/src: main/java/org/apache/myfaces/tobago/renderkit/css/CustomClass.java test/java/org/apache/myfaces/tobago/renderkit/css/CustomClassUnitTest.java
Date Thu, 04 May 2017 16:12:38 GMT
Author: lofwyr
Date: Thu May  4 16:12:38 2017
New Revision: 1793828

URL: http://svn.apache.org/viewvc?rev=1793828&view=rev
Log:
TOBAGO-1737: Dynamic CSS in <tc:style> support inside of <tc:sheet> and <ui:repeat>
fix null handling

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/CustomClass.java
    myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/css/CustomClassUnitTest.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/CustomClass.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/CustomClass.java?rev=1793828&r1=1793827&r2=1793828&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/CustomClass.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/css/CustomClass.java
Thu May  4 16:12:38 2017
@@ -76,7 +76,7 @@ public class CustomClass implements CssI
         LOG.error("Invalid CSS class name: '{}' which is part of '{}'", token, string);
       }
     }
-    return result.length() > 0 ? result.toString() : null;
+    return result.toString();
   }
 
   /**

Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/css/CustomClassUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/css/CustomClassUnitTest.java?rev=1793828&r1=1793827&r2=1793828&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/css/CustomClassUnitTest.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/css/CustomClassUnitTest.java
Thu May  4 16:12:38 2017
@@ -33,9 +33,9 @@ public class CustomClassUnitTest {
     Assert.assertEquals("-", "test-8", new CustomClass("test-8").getName());
     Assert.assertEquals("_", "__t_e_s_t-9 _d", new CustomClass("__t_e_s_t-9 _d").getName());
 
-    Assert.assertEquals(".", null, new CustomClass("test.10").getName());
-    Assert.assertEquals("tab", null, new CustomClass("test\t11").getName());
-    Assert.assertEquals(":", null, new CustomClass("test:12").getName());
+    Assert.assertEquals(".", "", new CustomClass("test.10").getName());
+    Assert.assertEquals("tab", "", new CustomClass("test\t11").getName());
+    Assert.assertEquals(":", "", new CustomClass("test:12").getName());
   }
 
 }



Mime
View raw message