forked from phoedos/pmd
Update changelog
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
This ruleset contains links to rules that are new in PMD v5.4.0
|
||||
</description>
|
||||
|
||||
<rule ref="rulesets/java/basic.xml/SimplifiedTernary"/>
|
||||
<rule ref="rulesets/java/comments.xml/CommentDefaultAccessModifier"/>
|
||||
<rule ref="rulesets/java/design.xml/SingleMethodSingleton"/>
|
||||
<rule ref="rulesets/java/design.xml/SingletonClassReturningNewInstance"/>
|
||||
|
@ -797,7 +797,7 @@ public class Count {
|
||||
|
||||
<rule name="SimplifiedTernary"
|
||||
language="java"
|
||||
since="5.3.2"
|
||||
since="5.4.0"
|
||||
message="Ternary operators that can be simplified with || or &&"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/rules/java/basic.html#SimplifiedTernary">
|
||||
@ -818,9 +818,9 @@ condition && foo when the literalBoolean is false
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value><![CDATA[
|
||||
//ConditionalExpression[not(PrimaryExpression//BooleanLiteral) and (Expression//BooleanLiteral)]
|
||||
//ConditionalExpression[@Ternary='true'][not(PrimaryExpression//BooleanLiteral) and (Expression//BooleanLiteral)]
|
||||
|
|
||||
//ConditionalExpression[not(Expression//BooleanLiteral) and (PrimaryExpression//BooleanLiteral)]
|
||||
//ConditionalExpression[@Ternary='true'][not(Expression//BooleanLiteral) and (PrimaryExpression//BooleanLiteral)]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
|
@ -32,6 +32,8 @@
|
||||
* New Rule: rulesets/java/comments.xml/CommentDefaultAccessModifier: In order to avoid mistakes with
|
||||
forgotten access modifiers for methods, this rule ensures, that you explicitly mark the usage of the
|
||||
default access modifier by placing a comment.
|
||||
* New Rule: rulesets/java/basic.xml/SimplifiedTernary: Ternary operator with a boolean literal
|
||||
can be simplified with a boolean expression.
|
||||
|
||||
|
||||
**Pull Requests:**
|
||||
@ -41,6 +43,7 @@
|
||||
* [#55](https://github.com/pmd/pmd/pull/55): Fix run.sh for paths with spaces
|
||||
* [#56](https://github.com/pmd/pmd/pull/56): Adding support for WSDL rules
|
||||
* [#57](https://github.com/pmd/pmd/pull/57): Add default access modifier as comment rule
|
||||
* [#58](https://github.com/pmd/pmd/pull/58): Add rule for unnecessary literal boolean in ternary operators
|
||||
|
||||
**Bugfixes:**
|
||||
|
||||
|
Reference in New Issue
Block a user