Skip to content

fix: resolve JDK 11+ compiler and deprecation warnings#495

Merged
frankgiordano merged 1 commit into
zowe:mainfrom
chaitanyakatore:fix/compiler-warnings
May 23, 2026
Merged

fix: resolve JDK 11+ compiler and deprecation warnings#495
frankgiordano merged 1 commit into
zowe:mainfrom
chaitanyakatore:fix/compiler-warnings

Conversation

@chaitanyakatore
Copy link
Copy Markdown
Contributor

Resolved Deprecated URL Constructor

  • Location: src/main/java/zowe/client/sdk/rest/ZosmfRequest.java
  • Details: In Java 20+, the new URL(String) constructor is deprecated due to potential parsing issues and lack of URL validation.
  • Fix: Replaced new URL(url).toURI() with the recommended new URI(url).toURL(). This approach is fully compatible with Java 11 through Java 22+ and compiles warning-free.

Resolved Compiler System Modules Warning

  • Location: pom.xml
  • Details: Compiling with 11 and 11 on newer JDK versions raises a warning regarding -system module location settings.
  • Fix: Configured the maven-compiler-plugin to use 11. This properly informs the compiler to verify compatibility against JDK 11 APIs and resolves the system modules warning.

Signed-off-by: chaitanya <chaitanyakatore@gmail.com>
@frankgiordano
Copy link
Copy Markdown
Collaborator

Thank you for the contribution. I’ve reviewed the changes and will merge them and publish a new point release.

@frankgiordano frankgiordano merged commit 715a960 into zowe:main May 23, 2026
2 checks passed
@frankgiordano frankgiordano added enhancement New feature or request Improvement labels May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Java 20+ URL Constructor Deprecation and Maven Compiler Warning

2 participants