diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 5e899562fc6..3d4cdaf375a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -59,6 +59,9 @@ Release 2.7.3 - UNRELEASED HADOOP-12792. TestUserGroupInformation#testGetServerSideGroups fails in chroot (Eric Badger via jlowe) + HADOOP-8818. Use equals instead == in MD5MD5CRC32FileChecksum + and TFileDumper. (Brandon Li via suresh) + Release 2.7.2 - 2016-01-25 INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java index 4da7851cab1..21f56ed1d94 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java @@ -134,7 +134,7 @@ public class MD5MD5CRC32FileChecksum extends FileChecksum { try { // old versions don't support crcType. - if (crcType == null || crcType == "") { + if (crcType == null || crcType.equals("")) { finalCrcType = DataChecksum.Type.CRC32; } else { finalCrcType = DataChecksum.Type.valueOf(crcType); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java index 5f94f9d1903..aabdf57a266 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java @@ -126,7 +126,7 @@ class TFileDumper { dataSizeUncompressed += region.getRawSize(); } properties.put("Data Block Bytes", Long.toString(dataSize)); - if (reader.readerBCF.getDefaultCompressionName() != "none") { + if (!reader.readerBCF.getDefaultCompressionName().equals("none")) { properties.put("Data Block Uncompressed Bytes", Long .toString(dataSizeUncompressed)); properties.put("Data Block Compression Ratio", String.format(