I want to use btrace to inspect the byte[] value of a method return use the @Return annotation.
The byte array is actually a normal string encoded using utf8.
The class is like below:
Class A {
byte[] method1() {
...
}
}
I have tried printArray, but it only accepts type of Objetc[], not working for type of byte[].
For print, it just outputs the internal object id like '[B@4fbc7b65'.
Is there any other way can solve the problem?
Yes, this is an omission in BTrace (https://github.com/btraceio/btrace/issues/322)
For now, use "trusted" mode where the safety checks will be turned off and you can do eg.