[foreign-jextract] RFR: Do not try to resize constant string segments in TestClassGeneration.java

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Apr 20 10:33:55 UTC 2020


On Mon, 20 Apr 2020 10:02:19 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Hi,
> 
> This fixes a problem with the TestClassGeneration test, which tries to resize a MemrorySegment of a string constant,
> but this is not needed, since the constants will already have a segment of the right size. This is causing a failure
> since Foreign::withSize requires an unchecked address as input.  This patch replaces the withSize call to an assertion
> on the size.
> Thanks,
> Jorn

Looks good

-------------

Marked as reviewed by mcimadamore (Committer).

PR: https://git.openjdk.java.net/panama-foreign/pull/120


More information about the panama-dev mailing list