HBASE-4468 Wrong resource name in an error massage: webapps instead of hbase-webapps

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1174969 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-09-23 19:36:12 +00:00
parent a170f9ee4e
commit e086041801
2 changed files with 5 additions and 3 deletions

View File

@ -301,6 +301,8 @@ Release 0.92.0 - Unreleased
znode version mismatch (Ramkrishna) znode version mismatch (Ramkrishna)
HBASE-4446 Rolling restart RSs scenario, regions could stay in OPENING state HBASE-4446 Rolling restart RSs scenario, regions could stay in OPENING state
(Ming Ma) (Ming Ma)
HBASE-4468 Wrong resource name in an error massage: webapps instead of
hbase-webapps (nkeywal)
TESTS TESTS
HBASE-4450 test for number of blocks read: to serve as baseline for expected HBASE-4450 test for number of blocks read: to serve as baseline for expected

View File

@ -102,10 +102,10 @@ public class InfoServer extends HttpServer {
*/ */
protected String getWebAppsPath(String appName) throws FileNotFoundException { protected String getWebAppsPath(String appName) throws FileNotFoundException {
// Copied from the super-class. // Copied from the super-class.
URL url = getClass().getClassLoader().getResource("hbase-webapps/" + appName); String resourceName = "hbase-webapps/" + appName;
URL url = getClass().getClassLoader().getResource(resourceName);
if (url == null) if (url == null)
throw new FileNotFoundException("webapps/" + appName throw new FileNotFoundException(resourceName + " not found in CLASSPATH");
+ " not found in CLASSPATH");
String urlString = url.toString(); String urlString = url.toString();
return urlString.substring(0, urlString.lastIndexOf('/')); return urlString.substring(0, urlString.lastIndexOf('/'));
} }