Files
floci/src/test/java/io/github/hectorvent
TiM ecfef11b2f fix(dynamodb): accept newline as UpdateExpression clause separator (#449)
Go AWS SDK v2 expression.Builder joins top-level UpdateExpression
clauses with '\n' (e.g. "SET #a = :a\nADD #b :b"). Two bugs in the
clause walker silently dropped clauses on these inputs:

1. indexOfKeyword only accepted a literal space as the left word
   boundary, so a keyword preceded by \n/\t/\r was rejected. This
   meant findNextClauseKeyword returned -1 for the next clause, and
   the current clause helper consumed the next clause's text as its
   own operand. For "SET x = :a\nADD y :b" applySetClause swallowed
   ":a\nADD y :b" as the SET value, failed the placeholder lookup,
   and neither SET nor ADD ran. Relaxed the boundary check to accept
   any whitespace via Character.isWhitespace.

2. indexOfKeyword returned -1 at the first non-boundary occurrence of
   a keyword, even when a valid match existed later. An attribute
   named oldSET in "REMOVE oldSET SET newAttr = :v" masked the real
   SET. Looped past non-boundary hits until a boundary match or end
   of string.

3. applyRemoveClause, applyAddClause, and applyDeleteClause advanced
   on the next comma before checking for a clause keyword, so an
   intra-clause comma in a following SET (e.g. "ADD a :v SET b = :b,
   c = :c") consumed the SET keyword. Aligned all three helpers with
   applySetClause's "earlier of next clause keyword or next comma
   wins" rule.

Closes #430.
2026-04-14 22:14:22 -05:00
..