accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] branch master updated: ACCUMULO-4739 Fix variable names and formatting
Date Tue, 28 Nov 2017 20:34:43 GMT
This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new 9d806c8  ACCUMULO-4739 Fix variable names and formatting
9d806c8 is described below

commit 9d806c86f1efbe2445ef7283351d8490805ce674
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Tue Nov 28 11:42:58 2017 -0500

    ACCUMULO-4739 Fix variable names and formatting
---
 .../java/org/apache/accumulo/monitor/view/WebViews.java    | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java
index 6033ce0..750ea8c 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.monitor.view;
 
+import static org.apache.commons.lang.StringUtils.isEmpty;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -38,7 +40,6 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.monitor.Monitor;
-import org.apache.commons.lang.StringUtils;
 import org.glassfish.jersey.server.mvc.Template;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -59,19 +60,20 @@ public class WebViews {
   private static final Logger log = LoggerFactory.getLogger(WebViews.class);
 
   /**
-   * Get HTML for CSS and JS imports from configuration. See ACCUMULO-4739
+   * Get HTML for external CSS and JS resources from configuration. See ACCUMULO-4739
    *
-   * @param model map of the MVC model
+   * @param model
+   *          map of the MVC model
    */
   private void addExternalResources(Map<String,Object> model) {
     AccumuloConfiguration conf = Monitor.getContext().getConfiguration();
-    String imports = conf.get(Property.MONITOR_RESOURCES_EXTERNAL);
-    if (StringUtils.isEmpty(imports))
+    String resourcesProperty = conf.get(Property.MONITOR_RESOURCES_EXTERNAL);
+    if (isEmpty(resourcesProperty))
       return;
     List<String> monitorResources = new ArrayList<>();
     ObjectMapper objectMapper = new ObjectMapper();
     try {
-      for (String monitorResource : objectMapper.readValue(imports, String[].class)) {
+      for (String monitorResource : objectMapper.readValue(resourcesProperty, String[].class))
{
         monitorResources.add(monitorResource);
       }
     } catch (IOException e) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@accumulo.apache.org" <commits@accumulo.apache.org>'].

Mime
View raw message