Can`t delete last item of the pubsub node

Description

Pubsub node always returns last published item after patch "OF-859: Pubsub fix; misc cleanup"

@@ -1627,9 +1627,6 @@ else if (maxPublished != -1)

             DbConnectionManager.closeConnection(rs, pstmt, con);

         }

 

-        if (results.size() == 0)

-            return Collections.emptyList();

-

         return results;

     }

In case when this item  is already deleted it is a bug.

Affected version of Openfire is 4.0.1.

To fix this bug I suggest attached patch.

In this patch I set lastPublished variable to null when this published item has been removed.

Environment

None

Attachments

1

duplicates

Activity

Show:
Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Created April 10, 2017 at 2:48 PM
Updated August 29, 2017 at 3:54 PM
Resolved May 9, 2017 at 3:04 PM