Skip to content

Fix item type validation test and Java 21 deprecations#562

Open
wborn wants to merge 3 commits into
openhab:mainfrom
wborn:fix-testInvalidItemType
Open

Fix item type validation test and Java 21 deprecations#562
wborn wants to merge 3 commits into
openhab:mainfrom
wborn:fix-testInvalidItemType

Conversation

@wborn
Copy link
Copy Markdown
Member

@wborn wborn commented May 31, 2026

Generate the expected invalid item type message from the current thing description schema instead of hard-coding the full item type enumeration. This keeps the test stable when new item types are added to the XSD.

Also replace deprecated Java 21 API usage for Locale and URL creation.

Generate the expected invalid item type message from the current
thing description schema instead of hard-coding the full item type
enumeration. This keeps the test stable when new item types are added
to the XSD.

Also replace deprecated Java 21 API usage for Locale and URL creation.

Signed-off-by: Wouter Born <github@maindrain.net>
@wborn wborn requested a review from Copilot May 31, 2026 08:51
@wborn wborn requested a review from a team as a code owner May 31, 2026 08:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates OhInfXmlValidationCheckTest to keep the invalid item type validation test aligned with the current thing-description XSD and removes deprecated Locale/URL constructor usage in the touched test code.

Changes:

  • Generates the expected invalid item type error message from the fetched XSD enumeration.
  • Replaces new Locale("en", "US") with Locale.US.
  • Replaces test-side new URL(...) construction with URI.create(...).toURL().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

wborn and others added 2 commits May 31, 2026 11:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Wouter Born <github@maindrain.net>
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