myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1333051 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
Date Wed, 02 May 2012 14:01:16 GMT
Author: lofwyr
Date: Wed May  2 14:01:15 2012
New Revision: 1333051

URL: http://svn.apache.org/viewvc?rev=1333051&view=rev
Log:
TOBAGO-1117: Reduce logging

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java?rev=1333051&r1=1333050&r2=1333051&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
Wed May  2 14:01:15 2012
@@ -350,14 +350,12 @@ public abstract class AbstractUIGridLayo
           position = position.add(LayoutUtils.getPaddingBegin(orientation, getLayoutContainer()));
           position = position.add(getMarginBegin(orientation));
           for (int k = 0; k < i; k++) {
-            if (heads[k] == null || heads[k].getCurrent() == null) {
-              LOG.warn("Head is null, should be debugged... i=" + i + " k=" + k + " grid=\n"
+ grid,
-                  new NullPointerException());
-            } else {
-              if (heads[k].isRendered() && heads[k].getCurrent().greaterThan(Measure.ZERO))
{
-                position = position.add(heads[k].getCurrent());
-                position = position.add(getSpacing(orientation));
-              }
+            if (heads[k] != null
+                && heads[k].getCurrent() != null
+                && heads[k].isRendered()
+                && heads[k].getCurrent().greaterThan(Measure.ZERO)) {
+              position = position.add(heads[k].getCurrent());
+              position = position.add(getSpacing(orientation));
             }
           }
           if (orientation == Orientation.HORIZONTAL) {



Mime
View raw message