You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "David Johnson (JIRA)" <ji...@apache.org> on 2015/02/08 16:07:35 UTC
[jira] [Resolved] (ROL-2062) Missing NPE check in
IndexOperation#getDocument()
[ https://issues.apache.org/jira/browse/ROL-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Johnson resolved ROL-2062.
--------------------------------
Resolution: Fixed
Assignee: David Johnson (was: Roller Unassigned)
Thanks!
$ svn commit -m "Null pointer check for pubTime field in indexer via Kohei Nozaki (ROL-2062)" .
Sending app/src/main/java/org/apache/roller/weblogger/business/search/operations/IndexOperation.java
Transmitting file data .
Committed revision 1658184.
> Missing NPE check in IndexOperation#getDocument()
> -------------------------------------------------
>
> Key: ROL-2062
> URL: https://issues.apache.org/jira/browse/ROL-2062
> Project: Apache Roller
> Issue Type: Bug
> Components: Data Model & JPA Backend
> Affects Versions: 5.1.1
> Reporter: Kohei Nozaki
> Assignee: David Johnson
> Attachments: ROL-2062.patch
>
>
> In entry deletion, invocation of IndexManagerImpl#addEntryReIndexOperation() occurs and it assumes WeblogEntry.pubTime is present but it's null if it is a unpublished entry.
> -I think there's no impact for regular use but it seems like not intended behavior so- I think adding simple null check is reasonable.
> Step to reproduce:
> 1. Save a new entry as draft
> 2. Delete the draft
> Exception:
> ERROR 2015-02-08 09:39:10,152 WriteToIndexOperation:run - Error acquiring write lock on index
> java.lang.NullPointerException
> at org.apache.roller.weblogger.business.search.operations.IndexOperation.getDocument(IndexOperation.java:138)
> at org.apache.roller.weblogger.business.search.operations.ReIndexEntryOperation.doRun(ReIndexEntryOperation.java:91)
> at org.apache.roller.weblogger.business.search.operations.WriteToIndexOperation.run(WriteToIndexOperation.java:42)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> UPDATE:
> I found an another problematic situation. following procedure brings NPE at the same point:
> 1. Publish a entry
> 2. Save same entry which is published as a draft (back to draft)
> 3. Publish the entry again
> It has possibility of making some un-indexed content so it should be fixed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)