chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r963864 - in /hadoop/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/hicc/TimeHandler.java
Date Tue, 13 Jul 2010 21:16:55 GMT
Author: asrabkin
Date: Tue Jul 13 21:16:54 2010
New Revision: 963864

URL: http://svn.apache.org/viewvc?rev=963864&view=rev
Log:
CHUKWA-494. NPE when no time range specified. Contributed by Bernd Fondermann

Modified:
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/TimeHandler.java

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=963864&r1=963863&r2=963864&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Tue Jul 13 21:16:54 2010
@@ -24,6 +24,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    CHHUKWA-494.  NPE when no time range is specified. (Bernd Fondermann via asrabkin)
+
     CHUKWA-492. Correction to database setup instruction. (Bernd Fondermann via Eric Yang)
 
     CHUKWA-489. Fixed malformed SQL in MetricDataLoader when values contain single quote
character. (Kirk True via Eric Yang)

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/TimeHandler.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/TimeHandler.java?rev=963864&r1=963863&r2=963864&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/TimeHandler.java (original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/TimeHandler.java Tue Jul 13
21:16:54 2010
@@ -167,17 +167,17 @@ public class TimeHandler {
       session.setAttribute("start", "" + start);
       session.setAttribute("end", "" + end);
     } else if (request.getParameter("period") != null
-        && !request.getParameter("period").equals("")) {
+        && !"".equals(request.getParameter("period"))) {
       String period = xf.getParameter("period");
       parsePeriodValue(period);
     } else if (request.getParameter("start") != null
         && request.getParameter("end") != null) {
       start = Long.parseLong(request.getParameter("start"));
       end = Long.parseLong(request.getParameter("end"));
-    } else if (session.getAttribute("time_type").equals("range")) {
+    } else if ("range".equals(session.getAttribute("time_type"))) {
       start = Long.parseLong((String) session.getAttribute("start"));
       end = Long.parseLong((String) session.getAttribute("end"));
-    } else if (session.getAttribute("time_type").equals("last")
+    } else if ("last".equals(session.getAttribute("time_type"))
         && session.getAttribute("period") != null) {
       String period = (String) session.getAttribute("period");
       parsePeriodValue(period);



Mime
View raw message