Skip to content

Replace deprecated schema URL construction in OhInfXmlValidationCheck#563

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-review-comment-3329956246
Closed

Replace deprecated schema URL construction in OhInfXmlValidationCheck#563
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-review-comment-3329956246

Conversation

Copy link
Copy Markdown

Copilot AI commented May 31, 2026

This PR addresses the linked review comment requesting the Java 21 URL deprecation fix in production code (not only in tests).
The OhInfXmlValidationCheck schema download path now avoids new URL(String) while preserving existing behavior and error handling intent.

  • Production deprecation fix

    • Updated schema URL creation in getXSD(...) from deprecated new URL(schemaUrlString) to URI.create(schemaUrlString).toURL().
  • Error-path compatibility

    • Extended the existing catch block to include IllegalArgumentException (thrown by URI.create(...)) alongside IOException, so invalid schema strings are still handled via the same logging/null fallback path.
URL schemaUrl = URI.create(schemaUrlString).toURL();
return client.get(schemaUrl);

@wborn wborn marked this pull request as ready for review May 31, 2026 08:57
Copilot AI requested a review from a team as a code owner May 31, 2026 09:00
Copilot AI changed the title [WIP] Fix code based on review comment 3329956246 Replace deprecated schema URL construction in OhInfXmlValidationCheck May 31, 2026
Copilot finished work on behalf of wborn May 31, 2026 09:03
Copilot AI requested a review from wborn May 31, 2026 09:03
@wborn
Copy link
Copy Markdown
Member

wborn commented May 31, 2026

Thank you for your efforts.

@wborn wborn closed this May 31, 2026
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