lundi 25 mai 2020

Why doesn't java.reflect.Method.invoke wrap primitive return values with valueOf? [duplicate]

I just noticed that when invoking methods via reflection that return a boolean, the result is neither Boolean.TRUE nor Boolean.FALSE as I would expect as they are the definite result of Boolean.valueOf(). This feels strange to me.

Why is that?





Aucun commentaire:

Enregistrer un commentaire