cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nvazquez <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1593: CLOUDSTACK-9417: Usage module refactoring
Date Mon, 15 Aug 2016 18:20:18 GMT
Github user nvazquez commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1593#discussion_r74807418
  
    --- Diff: usage/src/com/cloud/usage/UsageSanityChecker.java ---
    @@ -72,7 +72,9 @@ protected boolean checkItemCountByPstmt(CheckCase checkCase) throws
SQLException
             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 --
    
    Hi @rafaelweingartner sorry I haven't seen you comment earlier, thanks for reviewing!
    Actually the first parameter on line 74 belongs to the one set on line 216, and the one
inside the `if` is only set if it was set on the query, on line 194.


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