Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
qpid-java-6.0, qpid-java-6.0.5, qpid-java-6.1
-
None
-
None
Description
Currently if we define a state transition more than once, only one will be used and the others will be silently discarded. For example on AbstractVirtualHost the state transition ERRORED -> ACTIVE is defined twice:
@StateTransition(currentState = {State.UNINITIALIZED, State.ERRORED}, desiredState = State.ACTIVE) private ListenableFuture<Void> onActivate() {...} @StateTransition( currentState = { State.STOPPED, State.ERRORED }, desiredState = State.ACTIVE ) private ListenableFuture<Void> onRestart() {...}
The relevant code that does the discarding is ConfiguredObjectTypeRegistry#addStateTransitions and ConfiguredObjectTypeRegistry#addStateTransition.
I would argue that this should be a compilation error.
Attachments
Issue Links
- duplicates
-
QPID-7104 [Java Broker] Creating multiple state transition methods on a ConfiguredObject should cause an error
- Closed