NPE in DefaultTicketRegistryCleaner due to Null-Objects in Ticket-Collection

Description

The Ticket-Collection returned by JBossCacheTicketRegistry.getTickets() method might contain Null-Objects (since they are allowed in an ArrayList). This leads to a NullPointerException in the DefaultTicketRegistryCleaner when iterating over the tickets (see line 81-86):

Which happened in our system.

To make the code more robust, consider a) using a Collection-implementation which does not allow Null-values when reading all tickets in JBossCacheTicketRegistry.getTickets() b) add a null-test before adding a Ticket to the Collection in the JBossCacheTicketRegistry.getTickets()-method or c) add a null-test to the DefaultTicketRegistryCleaner code mentioned above.

Environment

None

Assignee

Misagh Moayyed

Reporter

Odilo Oehmichen

Labels

None

Estimated End Date

None

Components

Fix versions

Affects versions

Priority

Minor
Configure