Skip to content

[Fix #1489] Serializing java defined files#1514

Draft
fjtirado wants to merge 3 commits into
serverlessworkflow:mainfrom
fjtirado:Fix_#1489
Draft

[Fix #1489] Serializing java defined files#1514
fjtirado wants to merge 3 commits into
serverlessworkflow:mainfrom
fjtirado:Fix_#1489

Conversation

@fjtirado

@fjtirado fjtirado commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Fix #1489

@fjtirado fjtirado force-pushed the Fix_#1489 branch 9 times, most recently from 2b3ca98 to 307fdd4 Compare July 3, 2026 16:58
Signed-off-by: fjtirado <ftirados@ibm.com>
@fjtirado fjtirado force-pushed the Fix_#1489 branch 2 times, most recently from eaa816f to ebbb43f Compare July 6, 2026 13:53
Signed-off-by: fjtirado <ftirados@ibm.com>
@fjtirado fjtirado force-pushed the Fix_#1489 branch 4 times, most recently from 25d3e50 to 59f0dbc Compare July 6, 2026 17:48
Comment on lines +39 to +41
boolean isEnabled = mapper.isEnabled(SerializationFeature.FAIL_ON_EMPTY_BEANS);
if (isEnabled) {
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

As stupid as it migh seem, disable fail_on_empty_bean has to be disabled when the method is non static and belongs to a java class with no fields

Comment on lines +64 to +68
} finally {
if (isEnabled) {
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, true);
}
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

And here we restore the original value (I guess AI will freak out, lets see)

Signed-off-by: fjtirado <ftirados@ibm.com>
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.

[Experimental] Allow serialization of Workflows defined using Java

1 participant