JDK-8060717 : [TESTBUG] Improve test coverage of MethodHandles.explicitCastArguments()
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-10-15
  • Updated: 2016-05-27
  • Resolved: 2015-08-17
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.
8u72Fixed 9 b79Fixed
Related Reports
Relates :  
Test coverage of MethodHandles.explicitCastArguments() is poor. Since it's part of public API, dedicated tests for this method should be developed. 

Test development considerations: * 4 major flavors: ref => ref (ref. cast), prim=>prim (prim. cast), ref => prim (unboxing), prim => ref (boxing), * complete enumeration of primitive/wrapper types (boxing/unboxing) + a diverse set of classes/interfaces(casts + on/off boot classpath); * individual type conversions are important, so focus should be on 0-arity & 1-arity cases (to check parameter & return type conversions); * not much value in covering higher arities; small number of tests for mismatch in number of parameters is enough.

JDK-8060483 is the bug, which wasn't caught by our test suites. test/java/lang/invoke/ExplicitCastArgumentsTest.java can be extended with the new tests.