Skip to content

Commit

Permalink
#1395: MetaModel Generator fails on Records
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Oct 4, 2022
1 parent 8456a98 commit ae4203c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -37,6 +37,7 @@
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.AbstractElementVisitor8;
import javax.tools.Diagnostic;

import org.eclipse.persistence.internal.helper.Helper;
import org.eclipse.persistence.internal.jpa.metadata.MetadataLogger;
Expand Down Expand Up @@ -298,4 +299,10 @@ public MetadataField visitVariable(VariableElement variableElement, MetadataClas

return field;
}

@Override
public MetadataAnnotatedElement visitUnknown(Element e, MetadataClass metadataClass) {
processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "Unsupported element", e);
return null;
}
}

0 comments on commit ae4203c

Please sign in to comment.