You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/07/25 22:53:57 UTC

[GitHub] [hbase] apurtell commented on a diff in pull request #4643: HBASE-27201 Clean up error-prone findings in hbase-backup

apurtell commented on code in PR #4643:
URL: https://github.com/apache/hbase/pull/4643#discussion_r929370965


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java:
##########
@@ -594,8 +598,10 @@ public int compare(BackupInfo o1, BackupInfo o2) {
       }
 
       private long getTimestamp(String backupId) {
-        String[] split = backupId.split("_");
-        return Long.parseLong(split[1]);
+        Iterator<String> i = Splitter.on('_').split(backupId).iterator();

Review Comment:
   I see this as recurring feedback, got it. Will apply this pattern to these things. There are other cases in other modules where the same change is appropriate.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org