Compare commits

...

2 Commits

Author SHA1 Message Date
Johannes Frohnmeyer 8db740a9eb
fix(serialize-generator): Additional explicit type check for debugging purposes
ci/woodpecker/push/woodpecker Pipeline was successful Details
2024-04-24 15:28:15 +02:00
Johannes Frohnmeyer efff813ed6
fix(serialize-generator): remove debug log 2024-04-24 15:03:50 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,8 @@ public class SerializeGeneratorProcessor extends AbstractProcessor2 {
switch (name) {
case "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" -> {
if (bld.nullSafe != null) throw new IllegalArgumentException("Duplicate annotation parameter: nullSafe");

View File

@ -33,7 +33,6 @@ public class InferredAdapter extends AdapterAdapter<InferredAdapter.Hydrated> {
var tmp = findTypeAdapterClass(type, refs);
// Ignore nullSafe for now
if (tmp != null) {
message.printMessage(Diagnostic.Kind.WARNING, "Inferred type adapter for " + type + " to " + tmp.left() + " (nullSafe: " + tmp.right() + ")");
this.typeAdapterClass = tmp.left();
}
}