The GitHub Actions job "CodeQL" on grails-core.git/grails8-groovy6-canary has 
failed.
Run started by GitHub user jamesfredley (triggered by jamesfredley).

Head commit for run:
44634943564173bdf52086a62dd029c78b819aab / James Fredley 
<[email protected]>
fix: Groovy 6 VerifyError in DefaultConstraintFactory default parameter

Groovy 6.0.0-SNAPSHOT generates invalid bytecode for constructors that
use a default-valued List parameter inside @CompileStatic classes.
Decompiled stack frames show Object where ArrayList is expected:

  Type 'java/lang/Object' (current frame, stack[4]) is not assignable
  to 'java/util/ArrayList'
  at DefaultConstraintFactory.<init>(Class, MessageSource):V

This breaks every validateable. At runtime VerifyError is raised the
first time the default-parameter overload is constructed, which cascades
into Validateable.validate(), grails-datastore-core bean wiring, and
any test that exercises constraints.

Workaround: replace the default-parameter signature with two explicit
constructors (the 2-arg one delegates to the 3-arg one with
[Object.class] as List<Class>). This is compilation-compatible - users
were already allowed to construct with or without the targetTypes arg.

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

With regards,
GitHub Actions via GitBox

Reply via email to