-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[pjlinkdevice] Remove org.apache.common #14430
Conversation
Signed-off-by: lsiepel <[email protected]>
Signed-off-by: lsiepel <[email protected]>
@nils are you available to review? |
@lsiepel Thanks for the hint, somehow I did not notice your review request. Will check your change sometime next week, latest next weekend... Are the other bindings using the same bits from org.apache.commons or all different? If they share a lot, I wonder how we can avoid duplicating the code (and if it's worth it, not saying that it's necessarily the case). |
@nils gentle ping, are you able to perform a review? |
@nils another gentle ping |
Before this PR goes into its first anniversary, I finally managed to setup an environment in Docker with some (virtual) devices to find for the discovery. 🎆 🍾 Looks good to me from a functionality point of view, thanks for adding unit tests for the new class! From an organizational point of view however, re-implementing this as copies in multiple bindings does not appeal to me very much.
I'd appreciate some additional thoughts from some @openhab/core-maintainers too! |
Thanks for testing and confirming it works as expected. I’ll raise an issue at the core repo like I did with the string utils class to ultimately create a utility in core making the dependency on org.apache obsolete without creating duplicate code. |
Signed-off-by: Leo Siepel <[email protected]>
Signed-off-by: Leo Siepel <[email protected]>
Signed-off-by: Leo Siepel <[email protected]>
Signed-off-by: Leo Siepel <[email protected]>
...n/java/org/openhab/binding/pjlinkdevice/internal/discovery/AbstractDiscoveryParticipant.java
Show resolved
Hide resolved
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.
LGTM, thank you
* Remove org.apache.common Signed-off-by: Leo Siepel <[email protected]>
* Remove org.apache.common Signed-off-by: Leo Siepel <[email protected]>
While some tests are provided and as far as i can determine all results returned for the subnet methods are identical to the apache lib, some corner cases might happen. I think that is inherent to implementing such method ourselves.
In totall 5 bindings use this
import org.apache.commons.net.util.SubnetUtils
so i could also prepare a PR for this util class to core repo, and re-use it from these bindings, otherwise, i duplicate this code to the other bindings too. @openhab/core-maintainers please adviseDepends on : openhab/openhab-core#4375