busbey commented on a change in pull request #1034: HBASE-23622 Reduced the 
number of Checkstyle violations in hbase-common
URL: https://github.com/apache/hbase/pull/1034#discussion_r366396601
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
 ##########
 @@ -192,7 +191,7 @@ public static short getDefaultReplication(final FileSystem 
fs, final Path path)
     Method m = null;
     Class<? extends FileSystem> cls = fs.getClass();
     try {
-      m = cls.getMethod("getDefaultReplication", new Class<?>[] { Path.class 
});
+      m = cls.getMethod("getDefaultReplication", Path.class);
 
 Review comment:
   The method `getDefaultReplication(Path)` has been a supported API in all the 
Hadoop versions we support for a very longs time. We should skip the reflection 
here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to