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

[lgwebos] Refactor usages of deprecated methods #18082

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

jlaur
Copy link
Contributor

@jlaur jlaur commented Jan 10, 2025

These methods are deprecated:

  • The method exec(java.lang.String) from the type java.lang.Runtime is deprecated since version 18
  • The constructor java.net.URL(java.lang.String) is deprecated since version 20

@jlaur jlaur added the additional testing preferred The change works for the pull request author. A test from someone else is preferred though. label Jan 10, 2025
@jlaur jlaur requested a review from sprehn as a code owner January 10, 2025 17:02
@jlaur jlaur removed the additional testing preferred The change works for the pull request author. A test from someone else is preferred though. label Jan 10, 2025
@jlaur
Copy link
Contributor Author

jlaur commented Jan 10, 2025

I was not able to test action showToast(icon, text) because it doesn't work with my TV, but I did a string comparison of the old and new result, and they match.

The exec replacement with new logging was tested on Linux:

2025-01-10 22:34:21.189 [DEBUG] [ng.lgwebos.internal.WakeOnLanUtility] - os: linux
2025-01-10 22:34:21.191 [DEBUG] [ng.lgwebos.internal.WakeOnLanUtility] - Command 'which arp' returned /usr/sbin/arp
2025-01-10 22:34:21.196 [DEBUG] [ng.lgwebos.internal.WakeOnLanUtility] - MAC address of host 192.168.0.62 is xx:xx:xx:xx:xx:xx

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks

@lsiepel lsiepel merged commit 3827872 into openhab:main Jan 11, 2025
2 checks passed
@lsiepel lsiepel added this to the 5.0 milestone Jan 11, 2025
@jlaur jlaur deleted the lgwebos-deprecated-methods branch January 11, 2025 14:14
GearrelW pushed a commit to GearrelW/openhab-addons that referenced this pull request Jan 12, 2025
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