fix(serialize-generator): Additional explicit type check for debugging purposes
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
efff813ed6
commit
8db740a9eb
|
@ -114,7 +114,8 @@ public class SerializeGeneratorProcessor extends AbstractProcessor2 {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "adapter" -> {
|
case "adapter" -> {
|
||||||
if (bld.adapter != null) throw new IllegalArgumentException("Duplicate annotation parameter: adapter");
|
if (bld.adapter != null) throw new IllegalArgumentException("Duplicate annotation parameter: adapter");
|
||||||
bld.adapter = (TypeMirror) value.getValue();
|
if (value.getValue() instanceof TypeMirror tm) bld.adapter = tm;
|
||||||
|
else throw new IllegalArgumentException("Unexpected value type: " + value.getValue().getClass() + " (with value" + value.getValue() + ")");
|
||||||
}
|
}
|
||||||
case "nullSafe" -> {
|
case "nullSafe" -> {
|
||||||
if (bld.nullSafe != null) throw new IllegalArgumentException("Duplicate annotation parameter: nullSafe");
|
if (bld.nullSafe != null) throw new IllegalArgumentException("Duplicate annotation parameter: nullSafe");
|
||||||
|
|
Loading…
Reference in New Issue