-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
[core] Added standard gravity and dBm Units #617
Conversation
The classes ImperialUnits and SIUnits both extended SmartHomeUnits. But the classes are used a singletons. Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Signed-off-by: Hilbrand Bouwkamp <[email protected]>
What's the reason to make the classes final and its constructor private? |
I assume it has been wrong before but has been possible to use every "SmartHomeUnit" as "SIUnit" and "ImperialUnit".
It is not valid anymore. It seems to be correct after the change because a SmartHomeUnit is not necessary an SIUnit. But should we mark this as "API breaking" (and merge it) as it can break the consumers. |
The classes already had private constructors, except for |
I checked the openhab2 repo and found 2 issues of problems due to the changes, but only in tests. I've created a pr (5016) to fix them. |
Thanks |
The change with unit classes parent (openhab#617) causes it to report missing imports of tec.uom.se when using static import. Before the change this was not a problem because the parent class was SmartHomeUnits. This change adds a new parent class for all units. Signed-off-by: Hilbrand Bouwkamp <[email protected]>
The change with unit classes parent (openhab#617) causes it to report missing imports of tec.uom.se when using static import. Before the change this was not a problem because the parent class was SmartHomeUnits. This change adds a new parent class for all units. Signed-off-by: Hilbrand Bouwkamp <[email protected]>
The change with unit classes parent (#617) causes it to report missing imports of tec.uom.se when using static import. Before the change this was not a problem because the parent class was SmartHomeUnits. This change adds a new parent class for all units. Signed-off-by: Hilbrand Bouwkamp <[email protected]>
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/started-getting-compile-error-after-mvn-clean/69799/3 |
The change with unit classes parent (openhab#617) causes it to report missing imports of tec.uom.se when using static import. Before the change this was not a problem because the parent class was SmartHomeUnits. This change adds a new parent class for all units. Signed-off-by: Hilbrand Bouwkamp <[email protected]> GitOrigin-RevId: caa9b71
Also did some clean up, which is in the first commit. The units are in the second commit.
Related to: https://github.com/openhab/openhab2-addons/pull/4913