JDK-7129801 : Merge the two method applicability routines
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: unknown
  • Submitted: 2012-01-13
  • Updated: 2013-08-01
  • Resolved: 2012-04-20
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.
JDK 8
8 b25Fixed
Description
There are two method applicability routines, one in Resolve and another in Infer. Those routine do very similar things so it would be desirable to merge the contents of the two into a single routine.

Comments
SUGGESTED FIX A webrev of this fix is available at the following URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/51fb17abfc32
24-01-2012

EVALUATION This is a very useful refactoring - the two routines are used to check that actual argument types conform to formal argument types. The only differences between the two routines are: *) Infer needs to replace type-variables in the formals with undetvars *) The exceptions being thrown if the applicability check fails are different in the two cases A solution would be to have a single routine that accepts an undetvar list and that has an handler helper class that knows how to handle resolution failures. This helper class will be subclassed by Resolve and Infer to provide ad-hoc logic for handling failures.
13-01-2012