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)
Date Mon, 06 Oct 2014 22:29:28 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 687d83c9e -> 8dc6abf2f


HDFS-7194 Fix findbugs "inefficient new String constructor" warning in DFSClient#PATH (yzhang
via cmccabe)


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

Branch: refs/heads/trunk
Commit: 8dc6abf2f4218b2d84b2c2dc7d18623d897c362d
Parents: 687d83c
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:09 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/8dc6abf2/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 8d4b4f9..9e76617 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -365,11 +365,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/8dc6abf2/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