db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Fisher (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-181) If DatabaseTaskBase._simpleLogging is false, _log is never set
Date Fri, 20 Jul 2007 21:16:06 GMT
If DatabaseTaskBase._simpleLogging is false, _log is never set
--------------------------------------------------------------

                 Key: DDLUTILS-181
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-181
             Project: DdlUtils
          Issue Type: Bug
          Components: Ant Tasks
    Affects Versions: 1.0
            Reporter: Joe Fisher
            Assignee: Thomas Dudziak
            Priority: Minor


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





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message