[
https://issues.apache.org/jira/browse/KITTY-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035140#comment-13035140
]
Alessandro Novarini commented on KITTY-16:
------------------------------------------
Sorry, but I can't see if the code you posted works or not unless you provide a
test that proves it.
Just looking at them, to me they're exactly the same, so I guess the join works
in a different way.
Assuming you have
mBeansPath = [ 'a', 'b', 'c' ]
if you want to get "a,b,c", in groovy you should write mBeansPath.join(',') and
not ','.concat(mBeansPath.join()), as far as I know [1]
I'm also looking at the API doc of the class ObjectName [2], so that I can
understand better what the code should do.
Another thing the puzzles me is the following:
you are testing that objectName.length() > 0 (line 155), but since you add ":"
to domain, the length will always be 1 or greater.
This points me again on your code in Jython, because my guess is that the len()
method acts differently from .length. Or that even in the original code there's
a bug hidden somewhere.
But these are just speculations, since I don't know Jython.
What do you think?
[1] http://groovy.codehaus.org/JN1015-Collections
[2]
http://download.oracle.com/javase/1.5.0/docs/api/javax/management/ObjectName.html
> ls(): Invalid character ',' in key part of property
> ----------------------------------------------------
>
> Key: KITTY-16
> URL: https://issues.apache.org/jira/browse/KITTY-16
> Project: Kitty
> Issue Type: Bug
> Environment: Mac OS X
> IntelliJ 10
> Groovy 1.7.3
> Reporter: Matthew Sacks
> Priority: Blocker
> Labels: unbreaking
> Original Estimate: 3h
> Remaining Estimate: 3h
>
> kitty> connect 127.0.0.1 9000
> connect 127.0.0.1 9000
> connecting to 127.0.0.1 at port 9000....
> the url is service:jmx:rmi:///jndi/rmi://127.0.0.1:9000/jmxrmi
> Successfully connected to host
> kitty> domains
> domains
> Domains Detected:
> 0: JMImplementation
> 1: Users
> 2: com.sun.management
> 3: Catalina
> 4: java.lang
> 5: java.util.logging
> kitty> setdomain Catalina
> setdomain Catalina
> Setting the domain to Catalina...
> The domain is set to Catalina
> kitty> ls
> ls
> listing files and directories...
> Invalid character ',' in key part of property
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira