RFR: 8323601: Improve LayoutPath.PathElement::toString [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Jan 29 17:44:43 UTC 2024


On Mon, 29 Jan 2024 17:22:07 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> Correct. Additional logic is needed to form a correct C syntax. It would be possible to provide a method that does this.
>
> We could add such a method under another issue (https://bugs.openjdk.org/browse/JDK-8323746) because it will be much easier to implement it once the contemplated changes for that issue are in.

After some more thinking, I think the toString should just mimic the expression used to create the path.
e.g. 
groupElement("foo")
or
sequenceElement()
sequenceElement(2)
sequenceElement(2, 3)
etc.

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

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


More information about the core-libs-dev mailing list