codeconsole commented on PR #16411:
URL: https://github.com/apache/grails-core/pull/16411#issuecomment-5872935085
Kept as one PR. Your mitigations are in, and three changes stay, with the
reasons below.
- 778d07203a: binding tries ISO first, then a format that reads the whole
value, then the 7.x read of the start of the value. Rows 4–7 of your table bind
as in 7.x again, and rows 1–3 keep the fix. The fallback also covers three
cases the whole-value rule had broken: `…T10:00:00.123+0200`, a custom format
that matches only the start, and `Timestamp#toString()` with nanos.
- 77fa0e0a4e: `convert(value, callable)` passes the `String` pattern again,
so a 7.x subclass works unchanged. The built-in converters use the new
`convert(value, iso, callable)`.
- 71359da6aa: JSON views keep the 7.x default `dateFormat`, so a configured
`timeZone` writes `-04` as before. `OffsetTime` keeps `ISO_OFFSET_TIME`
(`03:00:00-03:00`) in views, and `grails.converters.JSON` now uses the same
form.
- ecee9bf3f3: §76 is split into:
- what 8.0.0 restores from 7 (76.1);
- what renders differently than in 7 (76.2);
- what 7 did not render as a value (76.3);
- how to keep the 7 rendering (76.4, with a test).
- f54c009bc3: the marshallers and converters this PR adds are one generic
marshaller and one generic converter now (from @borinquenkid's branch). The
classes 7.0 shipped are unchanged.
Kept, since without them a Grails app renders these differently than the
same Spring Boot app:
- `Month` as `9`.
- On 9.0, #16414 writes `grails.converters.JSON` through Boot's
`JsonMapper`, which renders `Month` as a number.
- Keeping `"SEPTEMBER"` in 8.0 would change it for
`grails.converters.JSON` users twice (7→8, then 8→9) instead of once.
- `monthValueConverter` binds `9`, `"9"` and `"SEPTEMBER"`.
- `java.sql.Time` as `"01:48:46"`.
- The 7.x form put a 1970 date and a UTC shift on a time of day, and it
doesn't bind back: `"1970-01-01T08:48:46.000Z"` is a `typeMismatch` for a
`java.sql.Time` property.
- `"01:48:46"` binds back to the same `Time` (bd89825ee6).
- Date map keys in ISO.
- The 7.x key was `Date#toString()`, such as `"Wed Oct 08 01:48:46 MDT
2025"`: server zone, second precision, and not parseable by a JSON client, next
to ISO values.
Each of the three is one registration plus its docs. If the weekly prefers
the 7.x form for any of them, it's one commit on this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]