roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1243080 - /roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
Date Sat, 11 Feb 2012 15:16:49 GMT
Author: snoopdave
Date: Sat Feb 11 15:16:49 2012
New Revision: 1243080

URL: http://svn.apache.org/viewvc?rev=1243080&view=rev
Log:
Prevent NPE when template passes null weblog

Modified:
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java?rev=1243080&r1=1243079&r2=1243080&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
Sat Feb 11 15:16:49 2012
@@ -408,6 +408,12 @@ public class JPAWeblogEntryManagerImpl i
     public List getNextPrevEntries(WeblogEntry current, String catName,
             String locale, int maxEntries, boolean next)
             throws WebloggerException {
+
+		if (current == null) {
+			log.debug("WeblogEntry current cannot be null");			
+			return Collections.emptyList();
+		}
+
         Query query = null;
         List results = null;
         WeblogCategory category = null;



Mime
View raw message