[ mx4j-Bugs-1116245 ] MBeanPermission implies is incorrect with wildcards

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bugs item #1116245, was opened at 2005-02-04 16:28
Message generated for change (Settings changed) made by simonebordet
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1116245&group_id=47745

>Category: JMX implementation
>Group: Release 2.1.1
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Jeremy Boynes (jboynes)
Assigned to: Jeremy Boynes (jboynes)
Summary: MBeanPermission implies is incorrect with wildcards

Initial Comment:
MBeanPermission is too strict on interpreting wildcards
in ObjectNames

for example, ("a#b[c:d=e]").implies("*") should return
true according to the rules in the JavaDoc

----------------------------------------------------------------------

Comment By: Jeremy Boynes (jboynes)
Date: 2005-02-08 08:13

Message:
Logged In: YES 
user_id=378919

Applied patch and added testcase

----------------------------------------------------------------------

Comment By: Jeremy Boynes (jboynes)
Date: 2005-02-04 19:35

Message:
Logged In: YES 
user_id=378919

Changed the 3-part ctr to generate "-#-[-]" and things are
much happier now.

Thanks for the help Eamon, it stopped me going down the
wrong path.

Patch attached.

----------------------------------------------------------------------

Comment By: Jeremy Boynes (jboynes)
Date: 2005-02-04 18:21

Message:
Logged In: YES 
user_id=378919

I'll confess I am also confused here. Most of the confusion
stems from a bug in MBeanPermission.toString() where

new MBeanPermission(null, null, null).toString() displays
"(javax.management.MBeanPermission * getAttribute)"

So, the actual failure here is that:
MBeanPermission perm1 = new MBeanPermission("a#b[c:d=e]",
"getAttribute");
MBeanPermission perm2 = new MBeanPermission(null, null,
null, "getAttribute");
assertTrue(perm1.implies(perm2));

fails

It looks to me that the 3-null constructor is creating the
wrong pattern. I will dig into that a bit more.

----------------------------------------------------------------------

Comment By: Eamonn McManus (emcmanus)
Date: 2005-02-04 17:25

Message:
Logged In: YES 
user_id=770046

I am confused here. Are you saying that with:
  MBeanPermission p1 = new MBeanPermission("a#b[c:d=e]", "*");
  MBeanPermission p2 = new MBeanPermission("*", "*");
p1.implies(p2) should be true? The spec isn't supposed to
say that, and I don't understand how it can be read to. (I'd
certainly be interested in clarifications if this is not
already clear.)
On the other hand, p2.implies(p1) should be true.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=1116245&group_id=47745


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.