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

keep subscriptions up to date when accessories are replaced #172

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

ccutrer
Copy link
Collaborator

@ccutrer ccutrer commented Oct 24, 2022

but the connection is not torn down

also add the ability to modify accessories in a batch without having to regenerate all AIDs and IIDs (and other temporary data structures) at each intermediate step. You must use this mechanism if you plan on replacing an existing accessory with an equivalent one, but want to keep subscriptions intact.

but the connection is _not_ torn down

also add the ability to modify accessories in a batch without
having to regenerate all AIDs and IIDs (and other temporary
data structures) at each intermediate step. You must use this
mechanism if you plan on replacing an existing accessory with an
equivalent one, but want to keep subscriptions intact.
@ccutrer ccutrer requested a review from yfre October 25, 2022 19:18
Copy link
Contributor

@yfre yfre left a comment

Choose a reason for hiding this comment

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

please

  • add java doc to batch methods
  • review logging levels

}
reverse.get(connection).add(characteristic);
LOGGER.trace(
"Added subscription to " + characteristic.getClass() + " for " + connection.hashCode());
LOGGER.debug(
Copy link
Contributor

Choose a reason for hiding this comment

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

the logging levels in Java-HAP are aligned with openHAB logging levels.
https://www.openhab.org/docs/developer/guidelines.html#f-logging

i.e. "debug" is used for unexpected expected behavior.
trace for all detailed logging.
please revert it back to debug so that it is consistent within Java-HAP and as bonus also with openHAB
please check other LOGGER.debug in this PR as well

@ccutrer
Copy link
Collaborator Author

ccutrer commented Nov 23, 2022

ping @yfre : I believe I've addressed all of your comments

@yfre
Copy link
Contributor

yfre commented Nov 23, 2022

ping @yfre : I believe I've addressed all of your comments

@ccutrer thank you for the ping. Missed your last commit. :(
Thank for the changes, it looks for me now

@yfre yfre merged commit 3d271dc into hap-java:master Nov 23, 2022
@ccutrer ccutrer deleted the maintain-subscriptions branch November 23, 2022 21:37
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