zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakeshadr <...@git.apache.org>
Subject [GitHub] zookeeper pull request #155: ZOOKEEPER-2573: Modify Info.REVISION to adapt g...
Date Wed, 25 Jan 2017 10:06:14 GMT
Github user rakeshadr commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/155#discussion_r97743121
  
    --- Diff: src/java/main/org/apache/zookeeper/version/util/VerGen.java ---
    @@ -149,11 +150,9 @@ public static void main(String[] args) {
                             "Invalid version number format, must be \"x.y.z(-.*)?\"");
                     System.exit(1);
                 }
    -            int rev;
    -            try {
    -                rev = Integer.parseInt(args[1]);
    -            } catch (NumberFormatException e) {
    -                rev = -1;
    +            String rev = args[1];
    +            if (rev == null || rev.trim().isEmpty()) {
    +                rev = "-1";
                 }
    --- End diff --
    
    Else block is missing. Could you add rev.trim() function.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message