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

Order of Exceptions in generated classes is non-deterministic #1624

Closed
harrisric opened this issue Jan 12, 2022 · 3 comments · Fixed by #1625
Closed

Order of Exceptions in generated classes is non-deterministic #1624

harrisric opened this issue Jan 12, 2022 · 3 comments · Fixed by #1625

Comments

@harrisric
Copy link

Where a wsdl operation has multiple faults defined the order in which those appear on the generated classes is not deterministic. This means that generating classes from the same wsdl does not guarantee that they are identical and makes it more difficult to compare for differences between the classes generated from different versions of a wsdl.

It seems that this might be fixed by making com/sun/tools/ws/processor/model/Fault implement comparable and then use TreeSet within that and com/sun/tools/ws/processor/model/Operation when handling faults rather than HashSet.
There is a slight issue that Fault does not have any final properties so an implementation of comparable (e.g. based on name) is not strictly stable, but there seems to be no code that alters name.

@lukasj
Copy link
Member

lukasj commented Mar 25, 2022

Can you share some WSDL one can use to test this?

@harrisric
Copy link
Author

Hi @lukasj - the WSDL that has been problematic for me is this one: ws-client.zip
Unfortunately its quite large.
The problem shows up for example in the generated file AlertNotificationService2016:
image

@lukasj
Copy link
Member

lukasj commented Apr 5, 2022

thanks. Problem seems to be in the codemodel library from jaxb where the order of throws in the method signature is maintained but the order of parts of the javadoc comment (throws, params,...) is not

@lukasj lukasj transferred this issue from eclipse-ee4j/metro-jax-ws Apr 5, 2022
lukasj added a commit to lukasj/jaxb-ri that referenced this issue Apr 5, 2022
…terministic

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
lukasj added a commit that referenced this issue Apr 5, 2022
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.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 a pull request may close this issue.

2 participants