myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1451561 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
Date Fri, 01 Mar 2013 10:48:06 GMT
Author: lofwyr
Date: Fri Mar  1 10:48:05 2013
New Revision: 1451561

URL: http://svn.apache.org/r1451561
Log:
TOBAGO-1049: Tree inside of the Sheet (aka TreeTable) 
- only log a warning instead of throwing an exception, because a generic logger may call the
getters.

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

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java?rev=1451561&r1=1451560&r2=1451561&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIData.java
Fri Mar  1 10:48:05 2013
@@ -64,7 +64,8 @@ public abstract class AbstractUIData ext
     if (isTreeModel()) {
       return dataModel;
     } else {
-      throw new IllegalStateException("Not a tree model");
+      LOG.warn("Not a tree model");
+      return null;
     }
   }
 
@@ -220,7 +221,8 @@ public abstract class AbstractUIData ext
     if (isTreeModel()) {
       return ((TreeDataModel) getDataModel()).getPath();
     } else {
-      throw new IllegalStateException("Not a tree model");
+      LOG.warn("Not a tree model");
+      return null;
     }
   }
 
@@ -231,7 +233,8 @@ public abstract class AbstractUIData ext
     if (isTreeModel()) {
       return ((TreeDataModel) getDataModel()).isFolder();
     } else {
-      throw new IllegalStateException("Not a tree model");
+      LOG.warn("Not a tree model");
+      return false;
     }
   }
 
@@ -239,7 +242,8 @@ public abstract class AbstractUIData ext
     if (isTreeModel()) {
       return dataModel.getRowIndicesOfChildren();
     } else {
-      throw new IllegalStateException("Not a tree model");
+      LOG.warn("Not a tree model");
+      return null;
     }
   }
 }



Mime
View raw message