[ openjms-Bugs-667591 ] Can't use "true" as property name
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #667591, was opened at 2003-01-14 06:08
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=667591&group_id=54559
Category: specification
Group: v0.7.3.2
>Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Oh Jiung (ohju)
Assigned to: Jim Alateras (jalateras)
>Summary: Can't use "true" as property name
Initial Comment:
setBooleanProperty("true", true) throws JMSException.
"true" -- or any other reserved words of selector syntax --
should be accepted as property name.
This breaks JORAM test testBoolean2Long.
----------------------------------------------------------------------
>Comment By: Tim Anderson (tanderson)
Date: 2003-01-15 11:15
Message:
Logged In: YES
user_id=557161
The words NULL, TRUE, NOT, etc are not allowed as
property names. From section 3.5:
Property names must obey the rules for a message
selector identifier. See Section 3.8.1.1, Message
Selector Syntax for more information.
The reason is, is that if any of these were used in a
selector, the selector would be invalid, and
InvalidSelectorException should be thrown.
Eg. suppose a JMS provider allowed:
Message message = // get message
message.setStringProperty("NOT", "foo");
To select the above message:
String selector = "NOT = 'foo'"; // <-- INVALID !
From the javax.jms.Message javadoc, there is no
requirement that a provider verify that the property
names passed to the get*Property() methods are valid
property names.
----------------------------------------------------------------------
Comment By: Oh Jiung (ohju)
Date: 2003-01-15 06:56
Message:
Logged In: YES
user_id=687715
JMS RI (Sun J2EE 1.3.1) shows somewhat erroneous
behavior for 11 words: NULL, TRUE, FALSE, NOT, AND, OR,
BETWEEN, LIKE, IN, IS, ESCAPE.
getStringProperty accepts all without exception.
setStringProperty accepts some;
throws "JMSException: message property name is invalid"
for following (case sensitive):
NOT, AND, OR, BETWEEN, LIKE, IN, IS,
NULL, TRUE, FALSE, null, true, false, Null, True, False, ..
It may be correct and consistent to accept all without
exception.
----------------------------------------------------------------------
Comment By: Oh Jiung (ohju)
Date: 2003-01-15 05:06
Message:
Logged In: YES
user_id=687715
Those words cannot be property names in selector.
But spec doesn't exclude them from get/setProperty
methods.
----------------------------------------------------------------------
Comment By: Tim Anderson (tanderson)
Date: 2003-01-14 12:16
Message:
Logged In: YES
user_id=557161
This is incorrect. Property names cannot be the reserved
words: NULL, TRUE, FALSE, NOT, AND, OR, BETWEEN,
LIKE, IN, IS (or case variations of these).
Refer to Section '3.8.1.1 Message Selector Syntax' of the
JMS specification, under the 'Identifiers' bullet point.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=667591&group_id=54559