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

[bluetooth] Cleanup #15828

Merged
merged 1 commit into from
Nov 3, 2023
Merged

[bluetooth] Cleanup #15828

merged 1 commit into from
Nov 3, 2023

Conversation

lsiepel
Copy link
Contributor

@lsiepel lsiepel commented Oct 31, 2023

Some minor cleanup of warnings, code analysis / performance.
No functional change

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
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 lolodomo merged commit fddacb4 into openhab:main Nov 3, 2023
3 checks passed
@lolodomo lolodomo added this to the 4.1 milestone Nov 3, 2023
@lsiepel lsiepel deleted the bluetooth-cleanup branch November 3, 2023 21:52
@dw-8
Copy link
Contributor

dw-8 commented Nov 13, 2023

@lsiepel
Can you advise why you reverted #15320 that partially reverted #13967 to fix issue #15313.

Changing:
for (int i = 0; i < value.length; i++) {
ret[i] = value[i];
}

To:
System.arraycopy(value, 0, ret, 0, value.length);

Caused:
java.lang.ArrayStoreException: arraycopy: type mismatch: can not copy byte[] into int[]
at java.lang.System.arraycopy(Native Method) ~[?:?]

@lsiepel
Copy link
Contributor Author

lsiepel commented Nov 13, 2023

You are right, it hsould not have been added to that PR. Somehow i forgot and fixed the SAT warning with the same implementation leading to the same ArrayStoreException
I still have to get used to how this is treated in java. No build exception. I really like how c# handles this. Nevertheless i'll come up with a solution asap.

andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Nov 26, 2023
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants