hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject git commit: HDFS-7194 Fix findbugs "inefficient new String constructor" warning in DFSClient#PATH (yzhang via cmccabe) (cherry picked from commit 8dc6abf2f4218b2d84b2c2dc7d18623d897c362d)
Date Mon, 06 Oct 2014 22:29:55 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 b5158c8d2 -> eeb39dc21


HDFS-7194 Fix findbugs "inefficient new String constructor" warning in DFSClient#PATH (yzhang
via cmccabe)
(cherry picked from commit 8dc6abf2f4218b2d84b2c2dc7d18623d897c362d)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/eeb39dc2
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/eeb39dc2
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/eeb39dc2

Branch: refs/heads/branch-2
Commit: eeb39dc21853f2e670d6be76d8fe3f002d559f42
Parents: b5158c8
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Mon Oct 6 15:29:09 2014 -0700
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Mon Oct 6 15:29:45 2014 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                      | 4 ++++
 .../src/main/java/org/apache/hadoop/hdfs/DFSClient.java          | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/eeb39dc2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 337284a..2ec5004 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -7,11 +7,15 @@ Release 2.7.0 - UNRELEASED
   NEW FEATURES
 
   IMPROVEMENTS
+
     HDFS-7055. Add tracing to DFSInputStream (cmccabe)
 
   OPTIMIZATIONS
 
   BUG FIXES
+    
+    HDFS-7194. Fix findbugs "inefficient new String constructor" warning in
+    DFSClient#PATH (yzhang via cmccabe)
 
 Release 2.6.0 - UNRELEASED
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/eeb39dc2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
index 86faf18..f54d325 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
@@ -3174,8 +3174,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     return saslClient;
   }
 
-  private static final byte[] PATH =
-      new String("path").getBytes(Charset.forName("UTF-8"));
+  private static final byte[] PATH = "path".getBytes(Charset.forName("UTF-8"));
 
   TraceScope getPathTraceScope(String description, String path) {
     TraceScope scope = Trace.startSpan(description, traceSampler);


Mime
View raw message