You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All JDK queues, and in general throughout the collections framework, do not handle sizes larger than Integer.MAX_VALUE. Two examples are LinkedList and LinkedBlockingQueue. And of course array-based versions will crash due to the length limit of an array. Because this has not been an issue in practice, it is generally acceptable to not follow the contract strictly and leave it unhandled until deemed necessary.
The only JDK collections that I'm aware of that does handle the size threshold is ConcurrentHashMap and ConcurrentSkipList[Set, Map].
I think this is unlikely enough to not be covered.
This is unlikely, but there's nothing to stop the unbounded queue to grow beyond MAX_INT length and so:
The text was updated successfully, but these errors were encountered: