myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r470496 - /myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
Date Thu, 02 Nov 2006 20:05:51 GMT
Author: bommel
Date: Thu Nov  2 12:05:47 2006
New Revision: 470496

URL: http://svn.apache.org/viewvc?view=rev&rev=470496
Log:
avoid NPE

Modified:
    myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java

Modified: myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java?view=diff&rev=470496&r1=470495&r2=470496
==============================================================================
--- myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
(original)
+++ myfaces/tobago/trunk/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
Thu Nov  2 12:05:47 2006
@@ -66,11 +66,14 @@
     String style = (String) component.getAttributes().get(ATTR_STYLE);
 
     if (style != null) {
-      // XXX ???
-      String heightString = HtmlRendererUtil.getStyleAttributeValue(style, "height").replaceAll("\\D",
"");
 
-      int height = Integer.parseInt(heightString) - 1;
-      style = HtmlRendererUtil.replaceStyleAttribute(style, "height", height + "px");
+      // XXX ???
+      String str = HtmlRendererUtil.getStyleAttributeValue(style, "height");
+      if (str != null) {
+        String heightString = str.replaceAll("\\D", "");
+        int height = Integer.parseInt(heightString) - 1;
+        style = HtmlRendererUtil.replaceStyleAttribute(style, "height", height + "px");
+      }
     }
 
     String clientId = component.getClientId(facesContext);



Mime
View raw message