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
What is the failure? What type of object are you trying to get when it fails?
When you use your workaround, what changes?
How did you choose the argument of indexOf and what does it mean?
It's not at all clear to me what you're doing or why.
It's not at all clear to me what you're doing or why.
I was getting numeric arrays from a bundle.
I have to deside what type of numeric array value is to convert it into Double.
Many thanks for your questions!
After a creative distance from some days I found my mistake.
I am working with an object array Object[] !!!
After printing object.toString() i got "[D@abcd...". It seems that
[ stands for an array maybe --> Class
D for the type Double --> Name
@ is a delimiter
and the rest is the hashCode().
getClass().getName() + '@' + Integer.toHexString(hashCode())
Object o = b.get(tag);
Unknowing the real reasons
if (o instanceof Double)
fails sometimes.
Workaround:
if (o.toString().indexOf("[D@") == 0)
Gregor
The text was updated successfully, but these errors were encountered: