question

Venkata T. avatar image
Venkata T. asked ·

How to capture a value from object type Boolean

Hi,

I need to monitor a boolean (object type) return value and extract true or false from it. is it possible as it is not simple data type. Any suggestions? 

production
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Answer

Christian S. avatar image
Christian S. answered ·

hi,

what do you mean with "monitor"?

if you capture this Boolean via a sensor rule then toString() will be called on it which should return "true" or "false" anyway (http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/Boolean.java#Boolean.toString%28%29).

and if not, you can still use deep object access to call booleanValue() on it (http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/Boolean.java#Boolean.booleanValue%28%29).

hope this helps,
Christian 

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Thanks Christian. i think i might need to use the deep object access. I will try and let you know

0 Likes 0 · ·