Wouter Zelle fixed a false positive in NonThreadSafeSingleton.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4303 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2006-03-20 14:28:52 +00:00
parent 46f5f0004f
commit fd90c51c08
3 changed files with 10 additions and 7 deletions

View File

@ -25,6 +25,7 @@ Fixed bug 1445231 - TestClassWithoutTestCases: no longer flags abstract classes.
Fixed bug 1445765 - PMD no longer uses huge amounts of memory. However, you need to use RuleViolation.getBeginLine(); RuleViolation.getNode() is no more.
Fixed bug 1447295 - UseNotifyAllInsteadOfNotify no longer flags notify() methods that have a parameter.
Implemented RFE 1415487 - Added a rulesets/releases/35.xml ruleset (and similar rulesets for previous releases) contains rules new to PMD v3.5
Wouter Zelle fixed a false positive in NonThreadSafeSingleton.
Fixed bug in CallSuperInConstructor; it no longer flag classes without extends clauses.
Fixed release packaging; now entire xslt/ directory contents are included.
Added more XSLT from Dave Corley - you can use them to filter PMD reports by priority level.

View File

@ -1125,14 +1125,16 @@ See Effective Java, item 48.
<property name="xpath">
<value><![CDATA[
//MethodDeclaration[$checkNonStaticMethods='true' or @Static='true'][@Synchronized='false']
//IfStatement[not (ancestor::SynchronizedStatement)]/Expression
/EqualityExpression
//IfStatement[not (ancestor::SynchronizedStatement)]
[Expression/EqualityExpression
[PrimaryExpression/PrimaryPrefix/Literal/NullLiteral]
[PrimaryExpression/PrimaryPrefix
/Name[@Image=
[PrimaryExpression/PrimaryPrefix/Name[@Image=
//FieldDeclaration[$checkNonStaticFields='true' or @Static='true']
/VariableDeclarator/VariableDeclaratorId/@Image]
]
/VariableDeclarator/VariableDeclaratorId/@Image]]]
[Statement//StatementExpression[AssignmentOperator]
[PrimaryExpression/PrimaryPrefix/Name/@Image=
ancestor::ClassOrInterfaceBody//FieldDeclaration[$checkNonStaticFields='true' or @Static='true']
/VariableDeclarator/VariableDeclaratorId/@Image]]
]]></value>
</property>
<property name="checkNonStaticMethods">

View File

@ -48,10 +48,10 @@
</subsection>
<subsection name="Contributors">
<ul>
<li>Wouter Zelle - Fixed a false positive in NonThreadSafeSingleton, a nice patch to clean up some of the Ant task properties and fix a TextRenderer bug, rewrote PositionLiteralsFirstInComparisons in XPath, Renderer improvement suggestions, wrote NonThreadSafeSingleton rule, wrote DefaultPackage rule, worked thru ASTMethodDeclaration.isSyntacticallyX design, reported docs bug 1292689 for UnnecessaryLocalBeforeReturn, reported leftover ExceptionTypeChecking source file, rewrote UselessOverridingMethod in Java, UselessOverridingMethod rule, ProperLogger rule, nifty code to allow variables in XPath rules, externalInfoUrl data for all rules in basic and unusedcode rulesets, some very nifty XSLT, improvements to UseCorrectExceptionLogging, designed and implemented the "externalInfoUrl" feature in the rule definitions, fixed a devious bug in RuleSetFactory, AvoidPrintStackTrace, initial implementation of SimplifyConditional</li>
<li>Uroshnor - Reported bug in UseNotifyAllInsteadOfNotify</li>
<li>Jan Koops - Noted missing data in MemberValuePair nodes, bug report for JBuilder plugin</li>
<li>Christopher Stach - several bug reports for rules that didn't handle JDK 1.5 enums</li>
<li>Wouter Zelle - A nice patch to clean up some of the Ant task properties and fix a TextRenderer bug, rewrote PositionLiteralsFirstInComparisons in XPath, Renderer improvement suggestions, wrote NonThreadSafeSingleton rule, wrote DefaultPackage rule, worked thru ASTMethodDeclaration.isSyntacticallyX design, reported docs bug 1292689 for UnnecessaryLocalBeforeReturn, reported leftover ExceptionTypeChecking source file, rewrote UselessOverridingMethod in Java, UselessOverridingMethod rule, ProperLogger rule, nifty code to allow variables in XPath rules, externalInfoUrl data for all rules in basic and unusedcode rulesets, some very nifty XSLT, improvements to UseCorrectExceptionLogging, designed and implemented the "externalInfoUrl" feature in the rule definitions, fixed a devious bug in RuleSetFactory, AvoidPrintStackTrace, initial implementation of SimplifyConditional</li>
<li>Xavier Le Vourch - SimplifyBooleanAssertion, patch to fix problem with TestClassWithoutTestCases, patch to fix rule name bugs in migration rulesets</li>
<li><a href="http://tersesystems.com/">Will Sargent</a> - Implemented AvoidThreadGroup, AvoidThrowingCertainExceptionTypesRule, AvoidCatchingNPERule, ExceptionAsFlowControlRule, URL updates for 'Similar projects' page</li>
<li>Benoit Xhenseval - noted Maven plugin bug (http://jira.codehaus.org/browse/MPPMD-24), bug report for UnusedPrivateMethod, suggestion to add elapsed time to XML report, bug report for ImmutableField, many bug reports (with good failure cases!), Ant task patch and bug report, XSLT patch, suggestion for improving XML report</li>