Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3472

Avoid possible recursion in log statement within AuditableInterceptor

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      Actually, when running reporting tests against 1.7+ we are facing to stackoverflow error because of this line in AuditableInterceptor:

      log.debug("Setting changed by fields on " + entity);
      

      Actually, invoking entity.toString() makes recursive call of this interceptor.
      Fix it in this way:

      log.debug("Setting changed by fields on " + entity.getClass());
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              mvorobey Mykola Vorobey
              Reporter:
              mvorobey Mykola Vorobey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h