hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1352395 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java
Date Thu, 21 Jun 2012 02:18:25 GMT
Author: tedyu
Date: Thu Jun 21 02:18:25 2012
New Revision: 1352395

URL: http://svn.apache.org/viewvc?rev=1352395&view=rev
Log:
HBASE-6248 Jetty init may fail if directory name contains "master" (Dave Revell)


Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java?rev=1352395&r1=1352394&r2=1352395&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/InfoServer.java Thu
Jun 21 02:18:25 2012
@@ -125,8 +125,10 @@ public class InfoServer extends HttpServ
     // web applications.
     final String master = "master";
     String p = getWebAppsPath(master);
-    int index = p.lastIndexOf(master);
     // Now strip master off the end if it is present
-    return index == -1? p: p.substring(0, index);
+    if(p.endsWith(master)) {
+      return p.substring(0, p.lastIndexOf(master));
+    }
+    return p;
   }
-}
\ No newline at end of file
+}



Mime
View raw message