From 865e9ab8b23c843ea48d01ed5e820efb95852918 Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Sat, 6 May 2006 02:12:13 +0000 Subject: [PATCH] fixed NPE on log level changing when helthcheck isn't in use git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@400225 13f79535-47bb-0310-9956-ffa450edef68 --- src/webapp/resources/admin/action.jsp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webapp/resources/admin/action.jsp b/src/webapp/resources/admin/action.jsp index be760f13678..d1eeef168c9 100644 --- a/src/webapp/resources/admin/action.jsp +++ b/src/webapp/resources/admin/action.jsp @@ -14,8 +14,6 @@ String enableActionStatus = ""; boolean isValid = false; - File enableFile = new File(enabledFile); - if (action != null) { // Validate fname if ("Enable".compareTo(action) == 0) isValid = true; @@ -28,6 +26,7 @@ if (isValid) { if ("Enable".compareTo(action) == 0) { try { + File enableFile = new File(enabledFile); if (enableFile.createNewFile()) { enableActionStatus += "Enable Succeeded (enable file "; enableActionStatus += enabledFile; @@ -41,6 +40,7 @@ } if ("Disable".compareTo(action) == 0) { try { + File enableFile = new File(enabledFile); if (enableFile.delete()) { enableActionStatus = "Disable Succeeded (enable file "; enableActionStatus += enabledFile; @@ -70,7 +70,8 @@ } else { enableActionStatus = "Illegal Action"; } - + // :TODO: might want to rework this so any logging change happens *after* + SolrCore.log.log(Level.INFO, enableActionStatus); %>