UnsupportedOperationException at java.util.AbstractList.add

前端 未结 6 2004
误落风尘
误落风尘 2020-12-07 23:51

I\'m having issues getting a block of code to run properly. I\'m not entirely sure WHAT this code does (I\'m trying to get a plugin that\'s out of date to work properly with

6条回答
  •  清歌不尽
    2020-12-08 00:28

    The problem is in the class of the list object that is returned by the get call. It doesn't override the add methods appropriately, and your code is therefore using the placeholder method provided by AbstractList.

    There's not much more we can say without knowing what the list class is, and (if it is custom code) seeing the source code.

提交回复
热议问题