You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2020/04/30 15:34:56 UTC

[lucene-solr] branch branch_8x updated: SOLR-14237: Fix HDFS nightly test failure

This is an automated email from the ASF dual-hosted git repository.

ishan pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 59c3b64  SOLR-14237: Fix HDFS nightly test failure
59c3b64 is described below

commit 59c3b64b5c4e2988218f2f080b91f105f248bb46
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Thu Apr 30 21:04:08 2020 +0530

    SOLR-14237: Fix HDFS nightly test failure
---
 .../org/apache/solr/handler/admin/SystemInfoHandler.java     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
index 97ea6f9..8016a25 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
@@ -323,8 +323,14 @@ public class SystemInfoHandler extends RequestHandlerBase
   {
     SimpleOrderedMap<Object> info = new SimpleOrderedMap<>();
 
-    if (cc.getAuthenticationPlugin() != null) info.add("authenticationPlugin", cc.getAuthenticationPlugin().getName());
-    if (cc.getAuthorizationPlugin() != null) info.add("authorizationPlugin", cc.getAuthorizationPlugin().getClass().getName());
+    if (cc != null) {
+      if (cc.getAuthenticationPlugin() != null) {
+        info.add("authenticationPlugin", cc.getAuthenticationPlugin().getName());
+      }
+      if (cc.getAuthorizationPlugin() != null) {
+        info.add("authorizationPlugin", cc.getAuthorizationPlugin().getClass().getName());
+      }
+    }
 
     // User principal
     String username = null;
@@ -333,7 +339,7 @@ public class SystemInfoHandler extends RequestHandlerBase
       info.add("username", username);
 
       // Mapped roles for this principal
-      AuthorizationPlugin auth = cc.getAuthorizationPlugin();
+      AuthorizationPlugin auth = cc==null? null: cc.getAuthorizationPlugin();
       if (auth != null) {
         RuleBasedAuthorizationPlugin rbap = (RuleBasedAuthorizationPlugin) auth;
         Set<String> roles = rbap.getRoles(username);