Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOGITO-5534: Codegen should use (un)marshallers for XmlElement(Ref) type #87

Merged
merged 2 commits into from
Aug 4, 2021

Conversation

manstis
Copy link

@manstis manstis commented Aug 4, 2021

See https://issues.redhat.com/browse/KOGITO-5534

In essence I now check for the presence of @XmlElement or @XmlElementRef on fields when generating the serializer\deserializer. I also do a similar check when processing the fields on beans to ensure code is also generated for classes not annotated with @XmlMapper.

@@ -269,11 +269,6 @@ public String getQualifiedName() {
return null;
}

@Override
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted, it overrode the super class method but did nothing different.

@@ -149,11 +149,6 @@ public boolean isAttribute() {
return property.getAnnotation(XmlAttribute.class) != null;
}

@Override
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted, it overrode the super class method but did nothing different.

@@ -90,7 +90,10 @@ private void processBean(TypeElement bean) {

private void processField(VariableElement field) {
if (checkField(field)) {
checkTypeAndAdd(field.asType());
// Ensure the serializer/deserializer is generated for the fields concrete type, considering
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't assume the field's type is correct.. try to look it up from annotations too.

@treblereel
Copy link
Owner

@manstis very cool, thanks a million !

@treblereel treblereel merged commit 860a0be into treblereel:master Aug 4, 2021
@manstis
Copy link
Author

manstis commented Aug 4, 2021

@treblereel Happy to help... it'd be great if you'd be able to release a newer version (with this fix) at some point.

@treblereel
Copy link
Owner

@manstis i think, i can switch jaxb to jakartaee and release all together, wdyt ?

@manstis
Copy link
Author

manstis commented Aug 4, 2021

@treblereel You could... but once the mapper-xml plugin is upgraded everyone that uses it will need to move too.

I'm more than happy to move my work to Jakarta however IDK if the DMN or BPMN teams would be affected?

If they are, then the move to Jakarta probably needs to be coordinated; or at least communicated.

@treblereel
Copy link
Owner

@manstis ok, let's wain for Roger...

@manstis
Copy link
Author

manstis commented Aug 4, 2021

@treblereel I'll send an email tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants