Details
-
Bug
-
Resolution: Done
-
Minor
-
JBossAS-4.0.2 Final
-
None
Description
Some of the JMS JMX operations throw NullPointerException when the object is not in
the "STARTED" state.
They should instead throw a more meaningul error message like
throw new IllegalStateException("Not started");
Example:
Caused by: java.lang.NullPointerException
at org.jboss.mq.server.jmx.Queue.getMessageCounter(Queue.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.AttributeDispatcher.dispatch(AttributeDispatcher.java:36)
... 61 more