Skip to content

Conversation

@kuntal1461
Copy link
Contributor

@kuntal1461 kuntal1461 commented Oct 7, 2025



Description

This PR removes all direct usages of System.out and printStackTrace() to align the codebase with SonarQube rules:

  • S106: Avoid using System.out or System.err
  • S1148: Avoid using printStackTrace()

All such occurrences have been replaced with appropriate logger.debug() or logger.error() statements while maintaining existing logging behavior (especially within prettyPrint helpers).

Additionally:

  • IDE-specific suppression comments were replaced with standard @SuppressWarnings annotations.
  • Test classes intentionally retain System.out usage for debugging convenience.
  • No functional or behavioral changes introduced.

Fixes: none (code quality cleanup)


Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor (non-breaking change)
  • 🧪 Tests
  • 📝 Documentation
  • 🧹 Chore (build or tooling)

Checklist

  • I have verified the build passes successfully
  • I have ensured no logic or functional behavior changed
  • The PR title is descriptive and follows commit conventions
  • The code adheres to Sonar recommendations (S106, S1148)
  • All tests pass locally
  • The PR is ready for review

Screenshots / Additional Context

No visual changes — this is a pure code hygiene and Sonar alignment cleanup.


@daniel-kmiecik
Copy link
Collaborator

daniel-kmiecik commented Oct 8, 2025

@kuntal1461 thank you for your time and contribution. I have some concerns about this PR. In addition to removing unnecessary System.out and printStackTraces, I see other changes that should not be part of this PR. For example, I see changes that are in PR #4986. There's also a configuration for VSCode that should not be added. Please correct this PR.

@kuntal1461 kuntal1461 force-pushed the chore/sonar-cleanup-no-system-out branch from 5c27a71 to 8fcecf9 Compare October 8, 2025 13:16
@kuntal1461
Copy link
Contributor Author

@daniel-kmiecik Please check once . and let me know if any ting I need to change .

@kuntal1461
Copy link
Contributor Author

@daniel-kmiecik Please update once .

@daniel-kmiecik
Copy link
Collaborator

@kuntal1461 please also correct the tests, as there are errors.

@kuntal1461
Copy link
Contributor Author

@daniel-kmiecik Please check once . and let me know if any ting I need to change .

@daniel-kmiecik daniel-kmiecik merged commit 4954f52 into swagger-api:master Oct 10, 2025
5 checks passed
@daniel-kmiecik
Copy link
Collaborator

daniel-kmiecik commented Oct 10, 2025

@kuntal1461 we really appreciate your commitment! Thank you!

@kuntal1461
Copy link
Contributor Author

Hi @daniel-kmiecik Thanks! Always happy to collaborate and improve together.

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.

2 participants