JDK-8270376 : Finalize API for memory copy
  • Type: Bug
  • Component: tools
  • Sub-Component: jextract
  • Affected Version: repo-panama
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2021-07-13
  • Updated: 2021-12-08
  • Resolved: 2021-12-08
Related Reports
Duplicate :  
Duplicate :  
Description
When we introduced the MemoryCopy helper class, few issues were raised:

* the order of arguments diverges from that of other JDK APIs (although we acknowledged that there was no other API quite like this)

* the naming of parameters felt too heavy, as distinguishing between "index" and "offset" is probably good enough

* naming of the method seems too verbose as well, with copyFromArray and copyToArray - which can be inferred from position of arguments.

* it would probably be a good idea to add some limited support for complex memory segment copy in this class as well.
Comments
This was addressed as part of JDK-8273905
08-12-2021