SOLR-14198: Nullpointer exception in AuditEvent with AuthorizationContext (#1192)

This commit is contained in:
Jan Høydahl 2020-01-22 21:39:43 +01:00 committed by GitHub
parent f1db918e20
commit 75c64089a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -221,6 +221,8 @@ Bug Fixes
* SOLR-13089: Fix lsof edge cases in the solr CLI script (Martijn Koster via janhoy)
* SOLR-14198: Nullpointer exception in AuditEvent when initialized from AuthorizationContext (janhoy)
* SOLR-6613: TextField.analyzeMultiTerm does not throw an exception when Analyzer returns no terms. (Bruno Roustant)
* SOLR-14192: Race condition between SchemaManager and ZkIndexSchemaReader. (ab)

View File

@ -170,9 +170,11 @@ public class AuditEvent {
.stream().map(r -> r.collectionName).collect(Collectors.toList());
setResource(authorizationContext.getResource());
this.requestType = RequestType.convertType(authorizationContext.getRequestType());
authorizationContext.getParams().forEach(p -> {
this.solrParams.put(p.getKey(), Arrays.asList(p.getValue()));
});
if (authorizationContext.getParams() != null) {
authorizationContext.getParams().forEach(p -> {
this.solrParams.put(p.getKey(), Arrays.asList(p.getValue()));
});
}
}
/**