Various implementations of java.util.List extend AbstractList. AbstractList provides useful methods for java.util.List and placeholders that throw UnsupportedOperationException.
When unsupported methods are called, the exception message is empty.
The analysis of those exceptions would be improved if the message would identify the method being invoked and the class implementing the List.
This information can be gleaned from the stacktrace and the source code but understanding and resolution would be quicker with a cogent message.
When unsupported methods are called, the exception message is empty.
The analysis of those exceptions would be improved if the message would identify the method being invoked and the class implementing the List.
This information can be gleaned from the stacktrace and the source code but understanding and resolution would be quicker with a cogent message.
- relates to
-
JDK-8135001 Enhance Collection.addAll(Collection<? extends E> c) to accept varargs
- Closed
-
JDK-6245673 (coll) Add a varargs constructor to the various Collection implementations
- Closed