Skip to content

StringUtils.parseLocaleString parses invalid locales successfully [SPR-17516] #22048

Closed
@spring-projects-issues

Description

@spring-projects-issues

Petar Tahchiev opened SPR-17516 and commented

Prior to spring-core 5.1.x calling this method:

StringUtils.parseLocaleString("some-locale-that-does-not-exist")

would throw IllegalArgumentException. However in spring-core 5.1.x (tested with 5.1.3.BUILD-SNAPSHOT) it doesn't. It simply returns a java.util.Locale object with language="some-locale-that-does-not-exist", region="", country=""


Affects: 5.1.2

Issue Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions