浏览代码

HADOOP-7351 Regression: HttpServer#getWebAppsPath used to be protected so subclasses could supply alternate webapps path but it was made private by HADOOP-6461

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1130730 13f79535-47bb-0310-9956-ffa450edef68
Michael Stack 14 年之前
父节点
当前提交
f4598b3f08
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      CHANGES.txt
  2. 1 1
      src/java/org/apache/hadoop/http/HttpServer.java

+ 4 - 0
CHANGES.txt

@@ -315,6 +315,10 @@ Release 0.22.0 - Unreleased
     HADOOP-7134. configure files that are generated as part of the released
     HADOOP-7134. configure files that are generated as part of the released
     tarball need to have executable bit set. (Roman Shaposhnik via cos)
     tarball need to have executable bit set. (Roman Shaposhnik via cos)
 
 
+    HADOOP-7351  Regression: HttpServer#getWebAppsPath used to be protected
+    so subclasses could supply alternate webapps path but it was made private
+    by HADOOP-6461 (Stack)
+
   IMPROVEMENTS
   IMPROVEMENTS
 
 
     HADOOP-6644. util.Shell getGROUPS_FOR_USER_COMMAND method name 
     HADOOP-6644. util.Shell getGROUPS_FOR_USER_COMMAND method name 

+ 1 - 1
src/java/org/apache/hadoop/http/HttpServer.java

@@ -462,7 +462,7 @@ public class HttpServer implements FilterContainer {
    * @return the pathname as a URL
    * @return the pathname as a URL
    * @throws FileNotFoundException if 'webapps' directory cannot be found on CLASSPATH.
    * @throws FileNotFoundException if 'webapps' directory cannot be found on CLASSPATH.
    */
    */
-  private String getWebAppsPath(String appName) throws FileNotFoundException {
+  protected String getWebAppsPath(String appName) throws FileNotFoundException {
     URL url = getClass().getClassLoader().getResource("webapps/" + appName);
     URL url = getClass().getClassLoader().getResource("webapps/" + appName);
     if (url == null) 
     if (url == null) 
       throw new FileNotFoundException("webapps/" + appName
       throw new FileNotFoundException("webapps/" + appName