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

Resolve deprecations warnings #58

Closed
romani opened this issue Jan 4, 2017 · 5 comments
Closed

Resolve deprecations warnings #58

romani opened this issue Jan 4, 2017 · 5 comments
Labels

Comments

@romani
Copy link
Member

romani commented Jan 4, 2017

Deprecation highlighted by Sonarqube - https://sonarcloud.io/project/issues?id=checkstyle_sonar-checkstyle&resolved=false&rules=java%3AS1874&severities=MINOR

Deprecation usage that were highlighted by Eclipse:

The field RulePriority.BLOCKER is deprecated
The field RulePriority.CRITICAL is deprecated
The field RulePriority.INFO is deprecated
The field RulePriority.MAJOR is deprecated
The field RulePriority.MINOR is deprecated

The method find(RuleQuery) from the type RuleFinder is deprecated
The type RulePriority is deprecated
The type RuleFinder is deprecated
The type ResourcePerspectives is deprecated
The type Project is deprecated
The type BatchExtension is deprecated

The method debtSubCharacteristic() from the type RulesDefinition.Rule is deprecated
The method line(Integer) from the type Issuable.IssueBuilder is deprecated
The method message(String) from the type Issuable.IssueBuilder is deprecated
The method readFileToString(File) from the type FileUtils is deprecated
The method setParent(Rule) from the type Rule is deprecated

The method start(String) from the type TimeProfiler is deprecated
The method stop() from the type TimeProfiler is deprecated

The constructor Project(String) is deprecated
The constructor TimeProfiler() is deprecated

@romani romani added the approved label Mar 8, 2019
@romani
Copy link
Member Author

romani commented Mar 8, 2019

@muhlba91 , can you recheck if this is still actual issue ?

@muhlba91
Copy link
Contributor

muhlba91 commented Mar 8, 2019

RulePriority is deprecated but SQ still uses it and returns it in methods we need. Hence, we still rely on it until SQ replaces the return values in their API.

Rule.setParent(Rule) is deprecated -> fixable by replacing it with Rule.setTemplate(Rule)

Not used (anymore):

  • ResourcePerspectives
  • Project
  • BatchExtension
  • Issuable.IssueBuilder
  • TimeProfiler
  • RulesDefinition.Rule.debtSubCharacteristic()
  • FileUtils.readFileToString(File) has been replaced by a non-deprecated method

ad RuleFinder:
it is marked as deprecated in SQ 6.7 but in later versions the deprecation gets removed since RuleFinder is kept for importer and exporter (on server side) and has been replaced by ActiveRules on scanner side - this fix has been made in #193.

@romani
Copy link
Member Author

romani commented Mar 8, 2019

Please close this issue and create new issue on what is left to do.

Hence, we still rely on it until SQ replaces the return values in their API.

Does it make sense to open issue on sonar to get details on such deprecation ?

@romani
Copy link
Member Author

romani commented Jan 22, 2020

@muhlba91 , as we migrated to new LTS, it is good time for cleanup of deprecations, and remove any adapters we did to keep compatibility with 6.7.

@muhlba91
Copy link
Contributor

closing this in favour of #217 as it addresses sonarcloud.io issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants