Fix issue: Microprofile dateLibrary java8 not working (#6062)

This commit is contained in:
Ravisankar-Challa
2020-06-17 17:30:10 +10:00
committed by GitHub
parent 42784ee1cc
commit b729e1d723

View File

@@ -209,7 +209,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
public void processOpts() {
if ((WEBCLIENT.equals(getLibrary()) && "threetenbp".equals(dateLibrary)) || NATIVE.equals(getLibrary())) {
dateLibrary = "java8";
} else if (MICROPROFILE.equals(getLibrary())) {
} else if (MICROPROFILE.equals(getLibrary()) && "threetenbp".equals(dateLibrary)) {
dateLibrary = "legacy";
}
@@ -451,7 +451,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("api_exception.mustache", apiExceptionFolder, "ApiException.java"));
supportingFiles.add(new SupportingFile("api_exception_mapper.mustache", apiExceptionFolder, "ApiExceptionMapper.java"));
importMapping.put("LocalDate", "org.joda.time.LocalDate");
serializationLibrary = "none";
} else {
LOGGER.error("Unknown library option (-l/--library): " + getLibrary());