[MAGNOLIA-8337] CommandsManager spams startup logs with deprecation warnings Created: 08/Mar/22 Updated: 20/Jul/22 Resolved: 22/Apr/22 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 6.2.17 |
| Fix Version/s: | 6.2.19 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Tim Molenaar | Assignee: | Alejandro Gomez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | nucleus | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: | |||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
||||||||||||
| Date of First Response: | |||||||||||||
| Epic Link: | Nucleus Quality Maintenance | ||||||||||||
| Sprint: | Nucleus 8 | ||||||||||||
| Story Points: | 1 | ||||||||||||
| Team: | |||||||||||||
| Description |
| Comments |
| Comment by Fernando Cherchi [ 23/Mar/22 ] |
|
Discovery Completed: The method reload() from CommandsManager should not be public. If that method would be removed, the warning would be gone and the protected super.reload method would be called. There is no extra logic to that method except the Deprecated Message and a call to super.reload. However, the method is being called from the outside of the hierarchy at least on the class CacheMonitor, providing a logic to reload in case the command would not be available yet. That code in CacheMonitor.getCommand(String) includes a TODO:
// TODO: why does it happen that commands are not ready? commandsManager.reload();
In this case, we cannot remove the CommandsManager because the CacheMonitor would not compile as the reload would become protected and thus, not accessible.
|
| Comment by Rabie Hayoun [ 25/Mar/22 ] |
|
Remove the deprecation utility call and leave the annotation |