forked from loafle/openapi-generator-original
Potencial NullPointerException fixes (#11923)
* Update pom.xml * Create build.yml * Eliminación de posibles NullPointerException * Delete build.yml * Update pom.xml
This commit is contained in:
parent
e159919ba5
commit
ba76ec9551
@ -1007,7 +1007,7 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
&& cgOperation.vendorExtensions.get(X_OPERATION_GROUPING) instanceof java.util.Map) {
|
||||
|
||||
Map.Entry<?, ?> operationGroupingEntry = ((Map<?, ?>) cgOperation.vendorExtensions
|
||||
.get(X_OPERATION_GROUPING)).entrySet().stream().findFirst().get();
|
||||
.get(X_OPERATION_GROUPING)).entrySet().stream().findFirst().orElse(null);
|
||||
|
||||
return Optional.of(new OperationGrouping(String.valueOf(operationGroupingEntry.getKey()),
|
||||
Integer.parseInt(String.valueOf(operationGroupingEntry.getValue()))));
|
||||
|
@ -144,7 +144,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
|
||||
.reduce((a, b) -> {
|
||||
throw new IllegalStateException("Multiple elements: " + a + ", " + b);
|
||||
})
|
||||
.get();
|
||||
.orElse(null);
|
||||
supportingFiles.remove(originalInitModel);
|
||||
supportingFiles.add(new SupportingFile("__init__model.mustache", packagePath() + File.separatorChar + "model", "__init__.py"));
|
||||
supportingFiles.add(new SupportingFile("__init__apis.mustache", packagePath() + File.separatorChar + "apis", "__init__.py"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user