JDK-7005140 : Cast: write new regression test checking all combinations
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: unknown
  • Submitted: 2010-12-07
  • Updated: 2024-04-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Cast conversion is an area in which we had many bugs - esp. since the addition of generics to the Java language. Most of those bugs are caused by some unexpected interaction between non-denotable types (added in JDK 5 to support generics), as described in http://blogs.sun.com/mcimadamore/entry/bugs_bugs_bugs.

It would be nice to have a combo test, like e.g. for type containment (http://hg.openjdk.java.net/jdk7/tl/langtools/file/12d8f7e417fd/test/tools/javac/api/TestContainTypes.java) in order to check all possible combinations of 'source' and 'target' types subject to cast conversion.

Comments
EVALUATION Things to consider: *) parametricity (target/source types being generic/not generic - if generic, what is/are the argument types? - for type-variables, there should be different kind of type-variables with different bounds (i.e. non recursive, recursive) *) 'final' on either target/source types (to test side-cats rules) *) interface vs. class (is the target/source type an interface?)
07-12-2010