db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DDLUTILS-181) If DatabaseTaskBase._simpleLogging is false, _log is never set
Date Sat, 08 Mar 2008 11:51:46 GMT

     [ https://issues.apache.org/jira/browse/DDLUTILS-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Dudziak resolved DDLUTILS-181.
-------------------------------------

    Resolution: Fixed

> 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
>             Fix For: 1.1
>
>
> 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