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

[squeezebox] Cleanup / code simplification #10941

Merged
merged 5 commits into from
Jul 18, 2021

Conversation

maniac103
Copy link
Contributor

@maniac103 maniac103 commented Jul 5, 2021

Improve code readability a bit by

  • using lambdas for anonymous listener instantiations
  • decoding URL encoded responses earlier so the code can check against non-encoded responses

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Copy link
Contributor

@mhilbush mhilbush left a comment

Choose a reason for hiding this comment

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

I left one comment for you to check.

Otherwise, LGTM

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: Danny Baumann <dannybaumann@web.de>
@kaikreuzer kaikreuzer requested a review from mhilbush July 18, 2021 07:18
@kaikreuzer kaikreuzer added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Jul 18, 2021
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

Thanks!

@kaikreuzer kaikreuzer merged commit 5d79938 into openhab:main Jul 18, 2021
@kaikreuzer kaikreuzer added this to the 3.2 milestone Jul 18, 2021
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 23, 2021
* [squeezebox] Reduce boilerplate by using lambda expressions.
* [squeezebox] Make code dealing with key/value responses more readable.
* Fix off-by-one mistake.
* [squeezebox] Simplify CLI response parsing code.
* [squeezebox] Optimize some redundant code.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
* [squeezebox] Reduce boilerplate by using lambda expressions.
* [squeezebox] Make code dealing with key/value responses more readable.
* Fix off-by-one mistake.
* [squeezebox] Simplify CLI response parsing code.
* [squeezebox] Optimize some redundant code.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
dw-8 pushed a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
* [squeezebox] Reduce boilerplate by using lambda expressions.
* [squeezebox] Make code dealing with key/value responses more readable.
* Fix off-by-one mistake.
* [squeezebox] Simplify CLI response parsing code.
* [squeezebox] Optimize some redundant code.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
dw-8 added a commit to dw-8/openhab-addons that referenced this pull request Jul 25, 2021
This reverts commit b401d8b.

Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this pull request Oct 26, 2021
* [squeezebox] Reduce boilerplate by using lambda expressions.
* [squeezebox] Make code dealing with key/value responses more readable.
* Fix off-by-one mistake.
* [squeezebox] Simplify CLI response parsing code.
* [squeezebox] Optimize some redundant code.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this pull request Nov 7, 2021
* [squeezebox] Reduce boilerplate by using lambda expressions.
* [squeezebox] Make code dealing with key/value responses more readable.
* Fix off-by-one mistake.
* [squeezebox] Simplify CLI response parsing code.
* [squeezebox] Optimize some redundant code.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* [squeezebox] Reduce boilerplate by using lambda expressions.
* [squeezebox] Make code dealing with key/value responses more readable.
* Fix off-by-one mistake.
* [squeezebox] Simplify CLI response parsing code.
* [squeezebox] Optimize some redundant code.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
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.

None yet

3 participants