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

[Maintenance] Handling Spotbugs internal representation (EI_EXPOSE_REP) #545

Open
2 tasks done
simonhir opened this issue Nov 22, 2024 · 1 comment
Open
2 tasks done
Labels
Priority: High The issue contains work with high priority. Template: Backend Issues regarding the backend template. Template: EAI Issues regarding the eai template. Type: Maintenance The issue contains maintenance work.

Comments

@simonhir
Copy link
Member

Relevant template

No response

Problem description (optional)

The Spotbugs EI_EXPOSE_REP warning is often discovered while development. In most cases there isn't the need for immutability.

Desired solution

A decision how to handle these warnings should be found and implemented.
Following are possible approaches:

  • Do nothing -> The user needs to suppress each one manually
  • Suppress all Spotbugs warnings for Lombok lombok.extern.findbugs.addSuppressFBWarnings = true (See https://projectlombok.org/features/configuration)
  • Suppress the EI_EXPOSE_REP Spotbugs warnings for the complete project

Considered alternatives (optional)

No response

Additional context (optional)

No response

No duplicate

  • I confirm that this issue is not a duplicate

Code of Conduct

  • I agree to follow this project's Code of Conduct
@simonhir simonhir added the Type: Maintenance The issue contains maintenance work. label Nov 22, 2024
@simonhir
Copy link
Member Author

simonhir commented Nov 22, 2024

Following the summary of a internal discussion between @devtobi @DanielOber @darenegade and me

Do nothing

Disadvantage: High overhead for developers
-> No real solution

Suppress all Spotbugs warnings for Lombok

Disadvantage: Other exceptions which could occur on Lombok code are still detected (Currently none known but settings this would also stop us from ever noticing any)
Advantage: EI_EXPOSE_REP warnings are still detected for custom code (i.e. NfcRequest)

Suppress EI_EXPOSE_REP globally

Disadvantage: Warning is also no longer detected for custom code
Advantage: Other warnings that could occur on Lombok code are still detected

Decision made: Suppress EI_EXPOSE_REP globally

@devtobi devtobi added Priority: High The issue contains work with high priority. Template: Backend Issues regarding the backend template. Template: EAI Issues regarding the eai template. labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High The issue contains work with high priority. Template: Backend Issues regarding the backend template. Template: EAI Issues regarding the eai template. Type: Maintenance The issue contains maintenance work.
Projects
Development

No branches or pull requests

2 participants