[ pmd-Bugs-1999280 ] ProperLogger false positives

View: New views
1 Messages — Rating Filter:   Alert me  

[ pmd-Bugs-1999280 ] ProperLogger false positives

by SourceForge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bugs item #1999280, was opened at 2008-06-21 02:35
Message generated for change (Settings changed) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=479921&aid=1999280&group_id=56262

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: pmd
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Anthony Whitford (awhitford)
Assigned to: Romain PELISSE (rpelisse)
Summary: ProperLogger false positives

Initial Comment:
The ProperLogger rule is firing inexplicably.  Here is an example:

import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@MessageDriven
public class TestListener implements MessageListener {
    private static final Log log = LogFactory.getLog(TestListener.class);

    public void onMessage(final Message message) {
        log.info("Test");
    }
}

I have several cases of this false positive.  (Is it possibly related to the fact that these classes implement an interface?)

----------------------------------------------------------------------

>Comment By: SourceForge Robot (sf-robot)
Date: 2009-11-05 02:20

Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 500 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Romain PELISSE (rpelisse)
Date: 2008-06-22 09:24

Message:
Logged In: YES
user_id=1679130
Originator: NO

Hi,
I think this is not really bug, you missed a configuration in the rule:

             <property name="staticLoggerName">
                     <value>LOG</value>
             </property>

By default, any logger should be name LOG, or your logger is named 'log'.
If you change the parameter below to 'log', there is no more violation in
the provided code sample.

If this was the issue, please, close the bug. Thanks !

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=479921&aid=1999280&group_id=56262

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Pmd-devel mailing list
Pmd-devel@...
https://lists.sourceforge.net/lists/listinfo/pmd-devel