Avoid ArrayList allocation in JtaTransactionCoordinatorImp in common scenario

Description

JtaTransactionCoordinatorImp might occasionally need an internal list of observers. In many cases this list will be empty: avoid allocating the list.

The strongest benefit is that this allows us to also skip allocating the defensive copy this was needing during its "special" iteration implementation.

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Minor
Configure