-
-
Notifications
You must be signed in to change notification settings - Fork 913
Handle locale-specific formats on macOS system_profiler output #2890
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
Conversation
Some macOS installations have 4 digits years on Last Modified dates of system_profiler SPApplicationsDataType output. This commit includes a fallback to theses scenarios.
|
Example of "system_profiler SPApplicationsDataType" output: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2890 +/- ##
==========================================
+ Coverage 85.87% 86.92% +1.05%
==========================================
Files 32 32
Lines 1423 1423
Branches 204 204
==========================================
+ Hits 1222 1237 +15
+ Misses 115 107 -8
+ Partials 86 79 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dbwiddis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR!
I've suggested an alternative fix. Let me know what you think.
oshi-core/src/main/java/oshi/software/os/mac/MacInstalledApps.java
Outdated
Show resolved
Hide resolved
dbwiddis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just a few nits.
oshi-core/src/main/java/oshi/jna/platform/mac/CoreFoundation.java
Outdated
Show resolved
Hide resolved
oshi-core/src/main/java/oshi/jna/platform/mac/CoreFoundation.java
Outdated
Show resolved
Hide resolved
oshi-core/src/main/java/oshi/software/os/mac/MacInstalledApps.java
Outdated
Show resolved
Hide resolved
oshi-core/src/main/java/oshi/software/os/mac/MacInstalledApps.java
Outdated
Show resolved
Hide resolved
oshi-core/src/main/java/oshi/software/os/mac/MacInstalledApps.java
Outdated
Show resolved
Hide resolved
oshi-core/src/main/java/oshi/jna/platform/mac/CoreFoundation.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Some macOS installations have 4 digits years on Last Modified dates of system_profiler SPApplicationsDataType output.
This commit uses JNA to get the correct date/time format