Skip to content

Conversation

laurentschoelens
Copy link
Collaborator

Fixes #433
Adds a SimpleToString plugin with customizations

@laurentschoelens laurentschoelens added the xjc-plugins Issue concerns basics plugins label Oct 20, 2023
@laurentschoelens laurentschoelens added this to the 4.0.1 milestone Oct 20, 2023
Copy link
Collaborator

@mattrpav mattrpav left a comment

Choose a reason for hiding this comment

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

For the test data, we should validate against the range for all types.

For example for long: null, min, max and zero values

<xs:element name="longMin" type="xs:long" minOccurs="0">
<xs:element name="longMax" type="xs:long" minOccurs="0">
<xs:element name="longNull" type="xs:long" minOccurs="0">
<xs:element name="longZero" type="xs:long" minOccurs="0">


final Object object = createContext().createUnmarshaller().unmarshal(sample);
if (object instanceof JAXBElement) {
System.out.println(((JAXBElement<?>) object).getValue().toString());
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should compare with the expected String output here

Copy link
Collaborator

Choose a reason for hiding this comment

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

@laurentschoelens will you have some time to look at updating the test check? I think this is a good change to get into next v4.x release!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need to do rework here before merging this. If I can, it'll be a GO for 4.0.1, or at least a reduced version of it (removing the way we format java.util.Date and java.time classes)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you had time to look into this?

@mattrpav mattrpav modified the milestones: 4.0.1, 4.0.2 Nov 22, 2023
@mattrpav mattrpav modified the milestones: 4.0.3, 4.0.4 Feb 7, 2024
@laurentschoelens laurentschoelens modified the milestones: 4.0.6, 4.0.next Mar 4, 2024
@mattrpav mattrpav modified the milestones: 4.0.next, 4.0.6 Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

xjc-plugins Issue concerns basics plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimpleToString plugin and new features for ToString plugin

2 participants