Uploaded image for project: 'Commons JCI'
  1. Commons JCI
  2. JCI-46

Add Guard conditions to logging statements

    Details

      Description

      The lack of Guard conditions on logging statements that concatenate objects to create the logging output results in unecessary StringBuffer creation when the logging level is below the threshold set.

      Would be a good idea IMO to change statements like:

      log.debug(getId() + " found class: " + name + " (" + clazzBytes.length + " bytes)");

      to

      if (log.isDebugEnabled())

      { log.debug(getId() + " found class: " + name + " (" + clazzBytes.length + " bytes)"); }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              niallp Niall Pemberton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: