Skip to content

Fix unquoted array string values truncated at parenthesis - #293

Merged
mbastian merged 1 commit into
masterfrom
fix/liststring-parens-2989
Aug 27, 2026
Merged

mbastian merged 1 commit into
masterfrom
fix/liststring-parens-2989

Conversation

@mbastian

Copy link
Copy Markdown
Member

Summary

  • FormattingAndParsingUtils.parseValue() treats ) the same as ] as an "end of value" delimiter, a rule meant for interval bounds like (1,2). ArraysParser reused this same method for plain array/string elements, where (/) have no structural meaning, so a literal ) inside an unquoted array element got misread as the end of the value and silently dropped.
  • Example: parsing the liststring [Foo,Bar(Foo)] produced ["Foo", "Bar(Foo"] instead of ["Foo", "Bar(Foo)"].
  • Fix: parseValue now takes a flag controlling whether ) counts as a closing bound (kept true for IntervalsParser/TimestampsParser, which need it); ArraysParser passes false and no longer treats (/) as ignorable structural characters, so they're preserved as literal content of unquoted values.

Fixes gephi/gephi#2989

Test plan

  • Added ArraysParserTest.testParseStringWithParenthesis covering the reported case plus leading/trailing/unbalanced parens.
  • mvn test passes for the full suite.

FormattingAndParsingUtils.parseValue() stopped unquoted value parsing
at ')' as well as ']', a rule intended for interval bounds like
"(1,2)". ArraysParser reused the same method for plain string/array
elements, so a literal ')' inside an unquoted array element (e.g.
liststring value "[Foo,Bar(Foo)]") was misread as the end of the
value and silently dropped.

Arrays are only ever delimited by '[', ']' and ',', so '(' and ')'
now have no structural meaning there and are kept as part of the
value.

Fixes gephi/gephi#2989
@mbastian
mbastian force-pushed the fix/liststring-parens-2989 branch from b937cd8 to 71a5d97 Compare August 27, 2026 11:07
@mbastian mbastian added this to the 0.8.8 milestone Aug 27, 2026
@mbastian mbastian added the bug label Aug 27, 2026
@mbastian
mbastian merged commit d85e865 into master Aug 27, 2026
1 check passed
MattArtzAnthro pushed a commit to MattArtzAnthro/graphstore that referenced this pull request Aug 28, 2026
…i#293)

FormattingAndParsingUtils.parseValue() stopped unquoted value parsing
at ')' as well as ']', a rule intended for interval bounds like
"(1,2)". ArraysParser reused the same method for plain string/array
elements, so a literal ')' inside an unquoted array element (e.g.
liststring value "[Foo,Bar(Foo)]") was misread as the end of the
value and silently dropped.

Arrays are only ever delimited by '[', ']' and ',', so '(' and ')'
now have no structural meaning there and are kept as part of the
value.

Fixes gephi/gephi#2989
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected liststring interpretation for string parentheses

1 participant