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

[systeminfo] Use AbstractStorageBasedTypeProvider #14501

Merged
merged 5 commits into from
May 12, 2023

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Feb 25, 2023

This is one of two reference implementations for the use of dynamic type providers.

@J-N-K J-N-K added enhancement An enhancement or new feature for an existing add-on awaiting other PR Depends on another PR labels Feb 25, 2023
@J-N-K J-N-K force-pushed the systeminfo-thing-type branch from 8f2874b to 8af7791 Compare March 4, 2023 12:31
@J-N-K J-N-K changed the title [systeminfo] Use AbstractDynamicTypeProvider [systeminfo] Use Abstract+STypeProvider Mar 4, 2023
@J-N-K J-N-K changed the title [systeminfo] Use Abstract+STypeProvider [systeminfo] Use AbstractStorageBasedTypeProvider Mar 4, 2023
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM

@lolodomo
Copy link
Contributor

lolodomo commented Apr 30, 2023

@svilenvul @mherwege : can you please have a look to this PR and the related PR in core framework to tell us if the change looks good to you for the systeminfo binding ?

@kaikreuzer kaikreuzer removed the awaiting other PR Depends on another PR label May 7, 2023
@lolodomo lolodomo added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels May 8, 2023
@lolodomo
Copy link
Contributor

lolodomo commented May 8, 2023

@J-N-K : build is failing due to call in tests of methods you removed. As your removals make sense, I guess that tests have to be updated.

[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ org.openhab.binding.systeminfo.tests ---
[INFO] Changes detected - recompiling the module!
[INFO] /home/jenkins/jenkins-agent1/workspace/PR-openHAB-Addons/itests/org.openhab.binding.systeminfo.tests/src/main/java/org/openhab/binding/systeminfo/test/SysteminfoOSGiTest.java:[275,51] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=org.openhab.core.thing.binding.@NonNull ThingTypeProvider'. Declaring type 'org.mockito.Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] /home/jenkins/jenkins-agent1/workspace/PR-openHAB-Addons/itests/org.openhab.binding.systeminfo.tests/src/main/java/org/openhab/binding/systeminfo/test/SysteminfoOSGiTest.java:[280,39] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=org.openhab.core.thing.type.@NonNull ChannelType'. Declaring type 'org.mockito.Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] /home/jenkins/jenkins-agent1/workspace/PR-openHAB-Addons/itests/org.openhab.binding.systeminfo.tests/src/main/java/org/openhab/binding/systeminfo/test/SysteminfoOSGiTest.java:[282,55] Unsafe interpretation of method return type as '@NonNull' based on substitution 'T=org.openhab.core.thing.type.@NonNull ChannelTypeProvider'. Declaring type 'org.mockito.Mockito' doesn't seem to be designed with null type annotations in mind
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/jenkins/jenkins-agent1/workspace/PR-openHAB-Addons/itests/org.openhab.binding.systeminfo.tests/src/main/java/org/openhab/binding/systeminfo/test/SysteminfoOSGiTest.java:[164,42] The method unbindSystemInfo(org.openhab.binding.systeminfo.internal.model.SysteminfoInterface) is undefined for the type org.openhab.binding.systeminfo.internal.SysteminfoHandlerFactory
[ERROR] /home/jenkins/jenkins-agent1/workspace/PR-openHAB-Addons/itests/org.openhab.binding.systeminfo.tests/src/main/java/org/openhab/binding/systeminfo/test/SysteminfoOSGiTest.java:[166,38] The method bindSystemInfo(org.openhab.binding.systeminfo.internal.model.OSHISysteminfo) is undefined for the type org.openhab.binding.systeminfo.internal.SysteminfoHandlerFactory

J-N-K added 4 commits May 8, 2023 16:58
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K force-pushed the systeminfo-thing-type branch from 8af7791 to 99e1a8a Compare May 8, 2023 19:07
@J-N-K J-N-K marked this pull request as ready for review May 9, 2023 08:57
@J-N-K J-N-K requested a review from svilenvul as a code owner May 9, 2023 08:57
@J-N-K J-N-K marked this pull request as draft May 9, 2023 10:39
@mherwege
Copy link
Contributor

@lolodomo LGTM, tested on a recent snapshot.

@J-N-K J-N-K marked this pull request as ready for review May 12, 2023 11:53
@lolodomo
Copy link
Contributor

@lolodomo LGTM, tested on a recent snapshot.

Excellent

@lolodomo lolodomo merged commit 16df575 into openhab:main May 12, 2023
@lolodomo lolodomo added this to the 4.0 milestone May 12, 2023
@J-N-K J-N-K deleted the systeminfo-thing-type branch May 12, 2023 12:08
tb4jc pushed a commit to tb4jc/openhab-addons that referenced this pull request Jun 19, 2023
* [systeminfo] Use AbstractDynamicTypeProvider

---------

Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Thomas Burri <thomas.burri@alstomgroup.com>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Aug 9, 2023
* [systeminfo] Use AbstractDynamicTypeProvider

---------

Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Matt Myers <mmyers75@icloud.com>
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
* [systeminfo] Use AbstractDynamicTypeProvider

---------

Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants