diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfServlet.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfServlet.java index cfd7b9768b2..2128de7aa0b 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfServlet.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfServlet.java @@ -69,7 +69,7 @@ public class ConfServlet extends HttpServlet { return; } - String format = parseAccecptHeader(request); + String format = parseAcceptHeader(request); if (FORMAT_XML.equals(format)) { response.setContentType("text/xml; charset=utf-8"); } else if (FORMAT_JSON.equals(format)) { @@ -89,7 +89,7 @@ public class ConfServlet extends HttpServlet { } @VisibleForTesting - static String parseAccecptHeader(HttpServletRequest request) { + static String parseAcceptHeader(HttpServletRequest request) { String format = request.getHeader(HttpHeaders.ACCEPT); return format != null && format.contains(FORMAT_JSON) ? FORMAT_JSON : FORMAT_XML; diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfServlet.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfServlet.java index 53089ed6b39..cf42219f6d8 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfServlet.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfServlet.java @@ -98,7 +98,7 @@ public class TestConfServlet { Mockito.when(request.getHeader(HttpHeaders.ACCEPT)) .thenReturn(contentTypeExpected); assertEquals(contenTypeActual, - ConfServlet.parseAccecptHeader(request)); + ConfServlet.parseAcceptHeader(request)); } }