cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rafaelweingartner <>
Subject [GitHub] cloudstack pull request #1593: CLOUDSTACK-9417: Usage module refactoring
Date Tue, 16 Aug 2016 15:22:24 GMT
Github user rafaelweingartner commented on a diff in the pull request:
    --- Diff: usage/src/com/cloud/usage/ ---
    @@ -72,7 +72,9 @@ protected boolean checkItemCountByPstmt(CheckCase checkCase) throws
             try (PreparedStatement pstmt = conn.prepareStatement(checkCase.sqlTemplate))
                 if(checkCase.checkId) {
                     pstmt.setInt(1, lastId);
    -                pstmt.setInt(2, maxId);
    +                if (maxId > 0) {
    +                    pstmt.setInt(2, maxId);
    --- End diff --
    @nvazquez thanks for the explanation. Now I understood it a little bit more. These SLQs
that are built using if(s)/else(s) and use few methods are a bit hard to follow sometimes
without debugging it in runtime.
    This was my only doubt. So, LGTM here.

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 or file a JIRA ticket
with INFRA.

View raw message