RFR: 8323601: Improve LayoutPath.PathElement::toString

Per Minborg pminborg at openjdk.org
Mon Jan 15 08:01:47 UTC 2024


On Mon, 15 Jan 2024 07:56:13 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> This PR proposes to add an improved Improve `LayoutPath.PathElement::toString` method simplifying debugging.
> 
> Opinions and suggestions for `static PathElement sequenceElement(long start, long step)` are welcome.

test/jdk/java/foreign/TestLayoutPaths.java line 341:

> 339:     public void testSequenceElementRangeToString() {
> 340:         PathElement e = PathElement.sequenceElement(2, 4);
> 341:         assertEquals(e.toString(), "sequence range 2 + N * 4, N >= 0");

Not sure this is the best way to express the toString for the range version.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17417#discussion_r1452026599


More information about the core-libs-dev mailing list