JDK-4886033 : Query.initialSubString etc fail if matched string contains wildcards
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-07-02
  • Updated: 2017-05-16
  • Resolved: 2005-07-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b45Fixed
Description
Query.{initial,any,final}SubString work by translating the string into a Query.match pattern.  For example, Query.initialSubString(a, Query.value("x")) is equivalent to Query.match(a, Query.value("x*")).  The problem arises if "x" is a string that already contains wildcards.  This string should be a literal match, but the implementation will interpret the wildcards as such.

Comments
SUGGESTED FIX Escape any magic characters in the string before giving it to Query.match.
01-09-2004

PUBLIC COMMENTS .
01-09-2004

EVALUATION Fairly straightforward to fix, but apparently nobody has ever run into this problem in the years that it has been present in the JMX RI so it may not be included in Tiger. ###@###.### 2004-02-10
10-02-2004