From 8a2a059887a7f4ea5600da6a4e7e871df65eb588 Mon Sep 17 00:00:00 2001 From: Kristof Neirynck Date: Tue, 27 Dec 2022 16:41:42 +0100 Subject: [PATCH] [Java] fix LocalTime import for dateLibrary java8 (#14111) The import mapping for LocalTime still pointed to org.joda.time.*. This one line made the jodatime dependency required. --- .../org/openapitools/codegen/languages/AbstractJavaCodegen.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index a5c578041d1d..da6c800022c4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -656,6 +656,7 @@ public void processOpts() { additionalProperties.put("jsr310", "true"); typeMapping.put("date", "LocalDate"); importMapping.put("LocalDate", "java.time.LocalDate"); + importMapping.put("LocalTime", "java.time.LocalTime"); if ("java8-localdatetime".equals(dateLibrary)) { typeMapping.put("DateTime", "LocalDateTime"); importMapping.put("LocalDateTime", "java.time.LocalDateTime");