JDK-7140820 : (coll) Add covariant overrides to Collections clone methods
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2012-01-30
  • Updated: 2021-05-10
  • Resolved: 2015-01-22
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The clone methods on the Cloneable collections just return the type Object, as the clone method inherited from Object does.  More precise information about be returned by adding a covariant override of clone to the Cloneable collections.

Comments
The link to the detailed compatibility discussion leads to a 404. Should probably be: https://mail.openjdk.java.net/pipermail/core-libs-dev/2012-February/009119.html
10-05-2021

But alas, given the potentially bad compatibility impact and the number of potential subclasses of collections types, I'm regrettably closing this bug as "will not fix."
22-01-2015

Detailed compatibility discussion: http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-January/009119.html
06-02-2014

Discussion thread on core-libs-dev: http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-January/009086.html
28-02-2013

EVALUATION A fine idea.
30-01-2012