roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Johnson (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (ROL-2062) Missing NPE check in IndexOperation#getDocument()
Date Mon, 30 Mar 2015 12:54:53 GMT

     [ https://issues.apache.org/jira/browse/ROL-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Johnson closed ROL-2062.
------------------------------

5.1.2 released

> 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
>             Fix For: 5.1.2
>
>         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)

Mime
View raw message