java.lang.UnsupportedOperationException: null
java.lang.UnsupportedOperationException: null
这个错一般是因为不支持的操作导致,即对象不支持某方法,显示抛出此异常。
举个例子:Arrays.asList
这个方法返回Arrays内部类ArrayList而不是java.util.ArrayList,而Arrays的内部类ArrayList是继承了AbstractList,AbstractList中的add、remove方法都没有overwrite,所以会显式的throw new UnsupportedOperationException()。