JDK-8191161 : Reconsider generification of XPathFunction.evaluate
  • Type: Bug
  • Component: xml
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-11-13
  • Updated: 2017-11-22
  • Resolved: 2017-11-16
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 10
10 b33Fixed
Related Reports
CSR :  
Relates :  
Description
In JDK-8191038, several type arguments were added to jaxp APIs including XPathFunction.evaluate.

However, better compatibility may be provided by generifying the evaluate method to accept a List<?> rather than a List<Object>.
Comments
The declaration List<Object> from a type system perspective allows the list to be modified within the caller, which doesn't seem to be needed in this case. List<Object> also means that one cannot pass, say, a List<String> as the args since List<String> is not a subtype of List<Object>. List<String> is a subtype of List<?> though.
13-11-2017