roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1517176 - /roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/business/search/operations/IndexOperation.java
Date Sat, 24 Aug 2013 18:24:36 GMT
Author: gmazza
Date: Sat Aug 24 18:24:36 2013
New Revision: 1517176

URL: http://svn.apache.org/r1517176
Log:
ROL-1929 Added NPE guard when indexing blog authors (could be null due to disabled/deleted
user of a group blog entry.

Modified:
    roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/business/search/operations/IndexOperation.java

Modified: roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/business/search/operations/IndexOperation.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/business/search/operations/IndexOperation.java?rev=1517176&r1=1517175&r2=1517176&view=diff
==============================================================================
--- roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/business/search/operations/IndexOperation.java
(original)
+++ roller/branches/roller_5.0/weblogger-business/src/main/java/org/apache/roller/weblogger/business/search/operations/IndexOperation.java
Sat Aug 24 18:24:36 2013
@@ -119,9 +119,11 @@ public abstract class IndexOperation imp
                 Field.Store.YES, Field.Index.NO));
 
         // text
-        doc.add(new Field(FieldConstants.USERNAME,
-                data.getCreator().getUserName(),
-                Field.Store.YES, Field.Index.ANALYZED));
+        if (data.getCreator() != null) {
+            doc.add(new Field(FieldConstants.USERNAME,
+                    data.getCreator().getUserName(),
+                    Field.Store.YES, Field.Index.ANALYZED));
+        }
 
         // text
         doc.add(new Field(FieldConstants.TITLE,



Mime
View raw message