add method to increment a debug log entry

XMLWordPrintable

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor
    • 2.6.8
    • Affects Version/s: None
    • Component/s: None
    • None

          /**
         * add a value to a log entry
         * @param debugMap
         * @param key
         * @param incrementBy any number
         */
        public static void debugMapIncrementLogEntry(Map<String, Object> debugMap, String key, Object incrementBy) {
          long incrementByLong = GrouperClientUtils.longValue(incrementBy, 0);
          
          Long currentValue = GrouperClientUtils.longObjectValue(debugMap.get(key), true);
          if (currentValue == null) {
            currentValue = 0L;
          }
          currentValue += incrementByLong;
          debugMap.put(key, currentValue);
        }
        

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: