Skip to content

Avoid use of java.net.URL constructors #29481

Description

@sbrannen

Overview

Since all URL constructors are deprecated starting with Java 20, we should stop using them in order to allow Spring Framework to be built using Java 20.

In addition, the rationale for deprecating those constructors (which is more important than the actual deprecation) is applicable today.

For full details, see the Constructing instances of URL section of the URL Javadoc. The API Note also provides valuable advice regarding correct usage of File, Path, URI, and URL.

Additional Resources

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions