-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavior when a single-byte space character is specified in MessageSelecter #377
Comments
@glassfishrobot Commented |
@glassfishrobot Commented
Now a string that contains one space is not, strictly speaking, an "empty string", since the method isEmpty would return false. So the specification is a little vague. However it seems reasonable to treat it like an empty string, and as you observe that's what ProtocolHandler does on the remote client before the selector is passed to the server. However in embedded mode the ProtocolHandler is by-passed, and from your report it appears that a SelectorFormatException is thrown. So A is the correct behaviour. Please report the exact exception and stack trace you get in case B, |
@glassfishrobot Commented
I report on an exact exception and the stack trace of the EMBEDDED operation. com.sun.messaging.jmq.util.selector.SelectorFormatException: Missing operand: " " Thanks. |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
If you specify a single-byte space character in MessageSelecter, in EMBEDDED operation or REMOTE operation,
When you try to generate the Browser instance, in each of the operating method, the results will differ.
A: EMBEDDED operation
Call the createBrowser method with a single-byte space character to MessageSelector.
ex) browser = JMSContext.createBrowser (Queue, " ")
At JMSServiceImpl of class addBrowser method, there is a process to invoke the compile method of the Selector class, In the same place, exception SelectorFormatException occurs, it fails to generate the instance.
B. REMOTE operation
As well as the A calls the createBrowser method.
At verifyDestination method of ProtocolHandler class, the value of MessageSelector is Null or, empty, in the case of a single-byte blank, All there is processing that is Null, and later because it is treated as Null, generation of the instance is completed successfully.
As the behavior of the A and B, and which is correct?
Using Open MQ version is 5.1_b09.
Affected Versions
[5.1 (RI-Bug-Fix), 5.1.1_b01]
The text was updated successfully, but these errors were encountered: