Default permission: "*" or "-"

Jeremy Boynes <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Coming back to a previous mail, I am still very confused about the way 
permission wildcards should work.

MX4J appears to be assuming that unspecified parts of a permission 
default to "*" wheras the RI defaults them to "-". As a result, if you 
run MBeanPermissionTest using JDK1.5 most of the tests fail.

The spec says, for example, "A class name pattern can also be empty or 
the single character "*", both of which grant access to any class." I 
believe MX4J is interpreting "empty" as being the same as "*" whereas 
the RI is interpreting it as "-"

Further confusing things is that I cannot see where the spec says "-" is 
allowed in a pattern String at all - the only mention is in the 
4-argument form where it says null and "-" are equivalent. It seems 
logical, just not explicitly defined.

Also, MX4J allows partial wildcards in the method part (e.g. 
"x#Bar*[x:x=x]" ) which the RI does not and which I read as an extension 
to the specification.

Changing the test so that the RI passes, and then changing the impl in 
MX4J so that it passes the new test suite is a significant change and 
before doing so I would like to ensure I am not making things worse.

Eamonn, can you confirm the intent here is that an empty pattern in part 
of the name should be treated as "-" i.e.
"Foo" == "Foo#-[-]" == ("Foo", null, null)
"#Bar" == "-#Bar[-]" == (null, "Bar", null)
"[x:x=x]" == "-#-[x:x=x]" == (null, null, "x:x=x")

Also, can you confirm that method parts ending in "*" would be a valid 
extension (assuming the TCK tests pass of course).

Simone, are you OK with me first redoing the MX4J tests so the RI passes 
and then changing MX4J to match?

Thanks
--
Jeremy


-------------------------------------------------------
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.