Skip to content

Conversation

k-wall
Copy link
Contributor

@k-wall k-wall commented Apr 30, 2025

Description

Fixes #7045

Extends the existing existingJavaTypes of the java-generator-maven-plugin' to allow the generated code to refer to existing enumerations.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

Copy link
Member

@andreaTP andreaTP left a comment

Choose a reason for hiding this comment

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

Thanks for this effort @k-wall !
Looks good apart from a single detail 🙂

@k-wall k-wall force-pushed the iss_7045 branch 2 times, most recently from ffc37ee to 2447e63 Compare April 30, 2025 09:57
@k-wall
Copy link
Contributor Author

k-wall commented Apr 30, 2025

I don't think the test failure showing in CI relates to my chnage.

 Errors: 
Error:    JdkHttpLoggingInterceptorTest>AbstractHttpLoggingInterceptorTest.httpLargeResponseBodyLogged:205 » Execution java.net.ProtocolException: protocol error: Frame type(114) length(6776096) exceeds MAX_FRAME_SIZE(16384)
[INFO]

Copy link
Member

@andreaTP andreaTP left a comment

Choose a reason for hiding this comment

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

Errors in CI are spurious, thanks a lot for the effort, LGTM 👍

@k-wall
Copy link
Contributor Author

k-wall commented May 2, 2025

Not sure if the Quality Gate being B means this cannot be merged. I looked at the issues being flagged by Sonar:

  • java:S107 - constructor parameter count rule doesn't seem to be well adhered to by the project. In this case, there doesn't appear to be a reasonable alternative to adding the pkg parameter.
  • java:S6355 - The project doesn't seem to use the Deprecated since/forRemoval parameters

the remaining issues relate to the new deprecated method.

I don't think there is anything to action. If the maintainers think different, I'll happily oblige.

@andreaTP
Copy link
Member

I don't think there is anything to action.

Agreed.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@andreaTP
Copy link
Member

Seems like there is some issues with the CI, @manusa this is ready to merge IMO.

@manusa
Copy link
Member

manusa commented May 19, 2025

Thx for the contribution, Keith.

Seems like there is some issues with the CI, @manusa this is ready to merge IMO.

I'm not sure if I'll be releasnig a 7.3.1 version tomorrow. Once that's clear I'll merge this one.

@k-wall
Copy link
Contributor Author

k-wall commented May 29, 2025

I'm not sure if I'll be releasnig a 7.3.1 version tomorrow. Once that's clear I'll merge this one.

I see main is now versioned 7.4 and this PR is tagged for 7.4. It is mergeable now? Hoping to see it land before bit-rot sets in.

Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit 4c3ad28 into fabric8io:main Aug 8, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow java-generator-maven-plugin reuse an existing enum
3 participants