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

Fix item name checking in ItemUtil #2941

Merged
merged 2 commits into from
May 21, 2022

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Apr 30, 2022

Fixes #2243

Since numbers as first character of the item name cause issues and the documentation already states that they are not allowed, the validity check is adjusted to reflect the correct policy.

Signed-off-by: Jan N. Klug github@klug.nrw

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of the Core label Apr 30, 2022
@J-N-K J-N-K requested a review from a team as a code owner April 30, 2022 13:10
@lolodomo
Copy link
Contributor

You also reject _ as first character.
Would it be a potential breaking change for users?

Signed-off-by: Jan N. Klug <github@klug.nrw>
@lolodomo
Copy link
Contributor

My question was rather: what will happen if users defined items starting with a number ?
The system will no more consider them ?

@J-N-K
Copy link
Member Author

J-N-K commented May 15, 2022

Yes, a warning will be logged when a provider tries to add that to the item registry.

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.

lgtm, thanks!

@kaikreuzer kaikreuzer merged commit 792b751 into openhab:main May 21, 2022
@kaikreuzer kaikreuzer added this to the 3.3 milestone May 21, 2022
@J-N-K J-N-K deleted the bug-fixitemnamechecking branch May 21, 2022 07:37
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/update-3-1-3-4-loss-of-sematic-model/142323/3

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 12, 2023
* Fix item name checking in ItemUtil

Signed-off-by: Jan N. Klug <github@klug.nrw>
GitOrigin-RevId: 792b751
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarification on valid Item naming needed
4 participants