You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a JMX Bean which has an operation to set some textual content (in this case it's a text representing a datetime).
The format is like "2024-04-05 10:25".
When I try to run the operation like this:
run -b com.xxx.yyy.zzz:name=hello,type=Handler setDateTime "2024-04-05 10:25"
I get an error like that:
#IllegalArgumentException: Operation setDateTime with 2 parameters doesn't exist in bean com.xxx.yyy.zzz:name=hello,type=Handler
I added some debug-output to the program for myself. I added these lines into RunCommand/execute():
for (String p : parameters) {
session.output.printMessage(String.format("Parameter: %s", p));
}
My log shows:
#Parameter: setDateTime
#Parameter: "2024-04-05
#Parameter: 10:25"
So it seems, the String is broken into two. I could not find why this happens. Is using the "" not the right was to "escape" the space?
I also tried a backslash in front of the space. Did not work.
Bug in the code or need I read the documentation more properly?
(PS: Thanks for your awesome tool!)
The text was updated successfully, but these errors were encountered:
I have a JMX Bean which has an operation to set some textual content (in this case it's a text representing a datetime).
The format is like "2024-04-05 10:25".
When I try to run the operation like this:
run -b com.xxx.yyy.zzz:name=hello,type=Handler setDateTime "2024-04-05 10:25"
I get an error like that:
#IllegalArgumentException: Operation setDateTime with 2 parameters doesn't exist in bean com.xxx.yyy.zzz:name=hello,type=Handler
I added some debug-output to the program for myself. I added these lines into RunCommand/execute():
My log shows:
#Parameter: setDateTime
#Parameter: "2024-04-05
#Parameter: 10:25"
So it seems, the String is broken into two. I could not find why this happens. Is using the "" not the right was to "escape" the space?
I also tried a backslash in front of the space. Did not work.
Bug in the code or need I read the documentation more properly?
(PS: Thanks for your awesome tool!)
The text was updated successfully, but these errors were encountered: