We're updating the issue view to help you get more done. 

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

Acceptance Test - Entry

None
Fixed

Assignee

Dave Cridland

Reporter

speedy

Labels

Expected Effort

None

Ignite Forum URL

None

Components

Fix versions

Affects versions

Priority

Minor
Configure