Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Fix SonarQube Issue : Remove this use of "defaultUnitSystem"; it is deprecated #40

Closed
PrashantBanavali opened this issue Oct 10, 2023 · 1 comment · Fixed by #139
Closed
Assignees
Labels
Milestone

Comments

@PrashantBanavali
Copy link
Collaborator

PrashantBanavali commented Oct 10, 2023

Describe the technical debt
This issue addresses the elimination of the usage of 'defaultUnitSystem' as it is outdated and deprecated, which may lead to technical debt and potential future compatibility issues.
Location: src/.../dennisguse/opentracks/settings/PreferencesUtils.java

Bug1

Screenshot 2023-10-10 181431

  • Consequences of the Issue:

    • Redundancy and Code Maintenance.
    • Maintainability and Debugging.
  • Why It Was Necessary to Be Fixed:

    • Code Redundancy.
    • Consistency and Clarity.

Proposed solution
Define the default UnitSystem and initialize it with UnitSystem.METRIC. This should be used when the records are filtered using firstFirst() and orElse() methods.

image

Technical information

  • Device: [e.g. Nexus 7 (2013)]
  • OS: [e.g. LineageOS 15.1]
  • OpenTracks version: [e.g. v3.2.4]
  • OpenTracks commit id (only for nightly builds): [e.g. 4b333bb]

Link to the commit

@PrashantBanavali PrashantBanavali added this to the Case Study 1 milestone Oct 10, 2023
@PrashantBanavali PrashantBanavali self-assigned this Oct 10, 2023
@PrashantBanavali PrashantBanavali pinned this issue Oct 10, 2023
@Rhmarwaha Rhmarwaha unpinned this issue Oct 11, 2023
PrashantBanavali added a commit that referenced this issue Oct 14, 2023
…eprecated

Add changes to remove the deprecated "defaultUnitSystem" 
as per Issue : #40
@hardik221 hardik221 mentioned this issue Oct 14, 2023
@PrashantBanavali PrashantBanavali linked a pull request Oct 14, 2023 that will close this issue
@PrashantBanavali
Copy link
Collaborator Author

A code change to resolve the technical debt is now available as part of PR #139.
Hence closing the issue.

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

Successfully merging a pull request may close this issue.

1 participant