diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 3adee445e5..cb49bc5343 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -617,6 +617,9 @@ Release 2.5.0 - UNRELEASED HADOOP-10711. Cleanup some extra dependencies from hadoop-auth. (rkanter via tucu) + HADOOP-10479. Fix new findbugs warnings in hadoop-minikdc. + (Swarnim Kulkarni via wheat9) + Release 2.4.1 - 2014-06-23 INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/hadoop/minikdc/MiniKdc.java b/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/hadoop/minikdc/MiniKdc.java index 33ff1bb9c2..d3ea2e70cf 100644 --- a/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/hadoop/minikdc/MiniKdc.java +++ b/hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/hadoop/minikdc/MiniKdc.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.minikdc; +import org.apache.commons.io.Charsets; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.text.StrSubstitutor; @@ -56,7 +57,7 @@ import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; +import java.io.FileInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; @@ -126,9 +127,9 @@ public static void main(String[] args) throws Exception { + file.getAbsolutePath()); } Properties userConf = new Properties(); - FileReader r = null; + InputStreamReader r = null; try { - r = new FileReader(file); + r = new InputStreamReader(new FileInputStream(file), Charsets.UTF_8); userConf.load(r); } finally { if (r != null) { @@ -438,7 +439,7 @@ private void initKDCServer() throws Exception { BufferedReader r = null; try { - r = new BufferedReader(new InputStreamReader(is2)); + r = new BufferedReader(new InputStreamReader(is2, Charsets.UTF_8)); String line = r.readLine(); while (line != null) {