Skip to content

[BUG][JAVA] Unused Locale Imports #22313

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}}.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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