forked from loafle/openapi-generator-original
better handling of null pointer in CodegenSecurity (#16433)
This commit is contained in:
parent
56105fbbe6
commit
1a654eba5c
@ -89,6 +89,10 @@ public class CodegenSecurity {
|
|||||||
public CodegenSecurity filterByScopeNames(List<String> filterScopes) {
|
public CodegenSecurity filterByScopeNames(List<String> filterScopes) {
|
||||||
CodegenSecurity filteredSecurity = new CodegenSecurity(this);
|
CodegenSecurity filteredSecurity = new CodegenSecurity(this);
|
||||||
|
|
||||||
|
if (scopes == null) {
|
||||||
|
return filteredSecurity;
|
||||||
|
}
|
||||||
|
|
||||||
List<Map<String, Object>> returnedScopes = new ArrayList<Map<String, Object>>();
|
List<Map<String, Object>> returnedScopes = new ArrayList<Map<String, Object>>();
|
||||||
Map<String, Object> lastScope = null;
|
Map<String, Object> lastScope = null;
|
||||||
for (String filterScopeName : filterScopes) {
|
for (String filterScopeName : filterScopes) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user