Skip to content

[BUG][JAVA] Unused Locale Imports #22313

@Chrimle

Description

@Chrimle

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Unused import of Locale. Stems from a change related to supportUrlQuery, to format strings using Locale. However, the import is most likely not needed except for this use-case.

openapi-generator version

Since Version 7.16.0.

OpenAPI declaration file content or url

ANY type: object, generating a Java class.

Generation Details

No custom configurations/configOptions.

Steps to reproduce
  1. Generate any pojo class.
  2. The class will have an unused import of java.util.Locale.
Related issues/PRs

Caused by PR #21871.

Suggest a fix

Wrap the import in model.mustache with {{#supportUrlQuery}}.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions