XMLWordPrintable

    Details

      Description

      Update increment operation fails when using long numbers.

      Long numbers get wrongly casted to integer so negative numbers are applied.

      Test Code:
      Update update = Update.empty().increment("counter", 2400000000l);
      log.info("Update: {}", update);

       

      The problem comes from the Update.IncrOp.toString() method which converts the long to int:
      public String toString()

      { return String.format("%s = %s %s %d", getColumnName(), getColumnName(), value.doubleValue() > 0 ? "+" : "-", Math.abs(value.intValue())); }

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              cvinacua Chema Vinacua
              Last updater:
              Mark Paluch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                30 weeks, 5 days ago

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified