Commit 46d442e
authored
Both classes previously exposed only a private `@AllArgsConstructor`-generated
canonical constructor whose first parameter is the padding `WeakReference`.
Deserializers (such as moderne-ast-write's V3 codegen) skip non-public
constructors and constructors that take a `WeakReference`, so these types
were invisible to static codegen and fell through to the dynamic-schema
read path — where, lacking any other public constructor, construction
failed and source files were substituted with a `Quark` + `DeserializationError`
marker.
Adding `@RequiredArgsConstructor` generates a public canonical constructor
that excludes the `@NonFinal` padding field, matching the pattern already
used by `S.CompilationUnit` and by rewrite-java types such as `J.MethodInvocation`.
The private padding-aware constructor remains for internal use.
1 parent 2b4cbc0 commit 46d442e
1 file changed
Lines changed: 2 additions & 0 deletions
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| |||
687 | 688 | | |
688 | 689 | | |
689 | 690 | | |
| 691 | + | |
690 | 692 | | |
691 | 693 | | |
692 | 694 | | |
| |||
0 commit comments