HBASE-6248 Jetty init may fail if directory name contains "master" (Dave Revell)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1352395 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fec5ef0f98
commit
6e5c615355
|
@ -125,8 +125,10 @@ public class InfoServer extends HttpServer {
|
|||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue