From da52fdb999ad173850e2912bc0394eb9a78dc172 Mon Sep 17 00:00:00 2001 From: Haohui Mai Date: Fri, 24 Oct 2014 14:19:52 -0700 Subject: [PATCH] HADOOP-11231. Remove dead code in ServletUtil. Contributed by Li Lu. --- .../hadoop-common/CHANGES.txt | 2 + .../org/apache/hadoop/util/ServletUtil.java | 40 ------------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 3f41cbcf0bd..299c4b70f95 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -227,6 +227,8 @@ Release 2.7.0 - UNRELEASED HADOOP-11506. Configuration variable expansion regex expensive for long values. (Gera Shegalov via gera) + HADOOP-11231. Remove dead code in ServletUtil. (Li Lu via wheat9) + BUG FIXES HADOOP-11512. Use getTrimmedStrings when reading serialization keys diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ServletUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ServletUtil.java index 48624cc38e1..02f5401a550 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ServletUtil.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ServletUtil.java @@ -87,46 +87,6 @@ public class ServletUtil { public static String htmlFooter() { return HTML_TAIL; } - - /** - * Generate the percentage graph and returns HTML representation string - * of the same. - * - * @param perc The percentage value for which graph is to be generated - * @param width The width of the display table - * @return HTML String representation of the percentage graph - * @throws IOException - */ - public static String percentageGraph(int perc, int width) throws IOException { - assert perc >= 0; assert perc <= 100; - - StringBuilder builder = new StringBuilder(); - - builder.append(""); - if(perc > 0) { - builder.append(""); - }if(perc < 100) { - builder.append(""); - } - builder.append("
"); - return builder.toString(); - } - - /** - * Generate the percentage graph and returns HTML representation string - * of the same. - * @param perc The percentage value for which graph is to be generated - * @param width The width of the display table - * @return HTML String representation of the percentage graph - * @throws IOException - */ - public static String percentageGraph(float perc, int width) throws IOException { - return percentageGraph((int)perc, width); - } - /** * Escape and encode a string regarded as within the query component of an URI. * @param value the value to encode