myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r921798 - /myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
Date Thu, 11 Mar 2010 11:05:32 GMT
Author: lofwyr
Date: Thu Mar 11 11:05:32 2010
New Revision: 921798

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

Modified:
    myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java

Modified: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java?rev=921798&r1=921797&r2=921798&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
(original)
+++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
Thu Mar 11 11:05:32 2010
@@ -159,11 +159,11 @@ public class Navigation {
   }
 
   public boolean isFirst() {
-    return state.getMarker().getPreviousNode().isRoot();
+    return state.getMarker() != null && state.getMarker().getPreviousNode().isRoot();
   }
 
   public boolean isLast() {
-    return state.getMarker().getNextNode() == null;
+    return state.getMarker() != null && state.getMarker().getNextNode() == null;
   }
 
   public String viewSource() {



Mime
View raw message