The GitHub Actions job "CI" on 
grails-core.git/feat/typeconverting-servlet-attributes-internal has succeeded.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
4f61d56876e2500127c139ad2c76a749903c4f7f / Scott Murphy Heiberg 
<[email protected]>
Add typed attribute converters to TypeConvertingMap, session, request, flash 
and servletContext

Extract the value-level conversion logic into an internal helper class
`org.grails.util.TypeConverters` (toByte/toInteger/toLong/toBoolean/
toStringValue/toDate/toList, etc., each with a default-value overload), have the
existing `TypeConvertingMap` instance `getX` methods delegate to it, and add a
`string`/`getString` converter.

Expose the full set of converters (`string`, `byte`, `char`, `short`, `int`,
`long`, `double`, `float`, `boolean`, `list`, `date`) directly on `HttpSession`,
`HttpServletRequest`, `ServletContext` and the `flash` scope (`FlashScope`) by
calling the internal converters on the attribute value, so attribute access is
statically compilable and type-safe under 
`@CompileStatic`/`@GrailsCompileStatic`,
e.g.:

    session.int('age', 21)
    session.string('tz', 'America/Los_Angeles')
    flash.string('notice')

Both the conversion logic and the default-value handling live in the single
internal `TypeConverters` class, shared by the map and the extensions, with no
new conversion methods added to the public `TypeConvertingMap` API. Calling the
internal converters directly avoids any per-access allocation. The only
exception is the boolean default, whose "is the value present" rule differs by
holder (map containsKey vs attribute set) and so stays per-site by design.
Includes tests covering conversion, null-safety, defaults and static resolution,
plus documentation.

Report URL: https://github.com/apache/grails-core/actions/runs/26993642546

With regards,
GitHub Actions via GitBox

Reply via email to