You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@glassfishrobot Commented @nigeldeakin said:
The JMS spec doesn't define what should happen in this case (though it is clearly invalid and an exception of some kind should result). Throwing a JMSException would probably be valid, but throwing a more specific unchecked exception would be valid too, in my opinion.
As a general policy, I don't think the existence of JMSException should force the provider to catch every possible unchecked exception (e.g. java.lang.OutOfMemoryError) and wrap it in a JMSException. The only cases where a JMSException must be thrown are in the cases listed in the API documentation, which relate to using an inappropriate method to read data from the byte array.
When invalid values are set for setBytes method of MapMessage, JMSException is not caused.
void setBytes(String name,byte[] value,int offset,int length)
I found a same bug in writeBytes method in StreamMessage as well.
void writeBytes(byte[] value, int offset, int length)
Environment
glassfish-4.0.1-b02-07_24_2013
Windows
The text was updated successfully, but these errors were encountered: