java.math.BigInteger cannot be cast to java.lang.Integer

后端 未结 5 1855
予麋鹿
予麋鹿 2020-12-13 09:48

I\'m getting the following exception.

Caused by:

java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Integer

5条回答
  •  清歌不尽
    2020-12-13 10:45

    You can use:

    Integer grandChildCount = ((BigInteger) result[1]).intValue();
    

    Or perhaps cast to Number to cover both Integer and BigInteger values.

提交回复
热议问题