Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-181

If DatabaseTaskBase._simpleLogging is false, _log is never set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.1
    • Ant Tasks
    • None

    Description

      If someone calls setSimpleLogging(false), internal varliaable _log reamins null

      As such

      DdlToDatabaseTask task = new DdlToDatabaseTask();
      task.setSimpleLogging(false);

      ...
      NPE later

      Below is my fix (in patch format)

      Index: DatabaseTaskBase.java
      ===================================================================
      — DatabaseTaskBase.java (revision 558128)
      +++ DatabaseTaskBase.java (working copy)
      @@ -345,6 +345,8 @@
      {^M
      if (_simpleLogging) {^M
      initLogging();^M
      + } else {^M
      + _log = LogFactory.getLog(getClass());^M
      }^M
      ^M
      if (!hasCommands())^M

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            javajoe1 Joe Fisher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: