You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by aj...@apache.org on 2009/05/06 05:07:54 UTC

svn commit: r772036 - /incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java

Author: ajaquith
Date: Wed May  6 03:07:54 2009
New Revision: 772036

URL: http://svn.apache.org/viewvc?rev=772036&view=rev
Log:
Fixed NPE in JCRWikiPage.getLastModified().

Modified:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java?rev=772036&r1=772035&r2=772036&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java Wed May  6 03:07:54 2009
@@ -225,7 +225,10 @@
     {
         try
         {
-            return getJCRNode().getProperty( LASTMODIFIED ).getDate().getTime();
+            if ( getJCRNode().hasProperty( LASTMODIFIED ) )
+            {
+                return getJCRNode().getProperty( LASTMODIFIED ).getDate().getTime();
+            }
         }
         catch( RepositoryException e )
         {
@@ -609,4 +612,5 @@
         
         return pages;
     }
-}
+    
+}
\ No newline at end of file