Change property name to be camelCase
This commit is contained in:
@ -22,7 +22,7 @@ This is a {{ site.pmd.release_type }} release.
|
||||
the type inference in Java has been improved.
|
||||
|
||||
In order to avoid false positives when checking Java7 only code, the rule has the new property
|
||||
`java7compatibility`, which is disabled by default. Settings this to "true" retains
|
||||
`java7Compatibility`, which is disabled by default. Settings this to "true" retains
|
||||
the old rule behaviour.
|
||||
|
||||
### Fixed Issues
|
||||
|
@ -1995,7 +1995,7 @@ which makes the code also more readable.
|
||||
|
||||
The diamond operator has been introduced with java 7. However, type inference has been improved further
|
||||
with java8, rendering more type parameters unnecessary. This is only possible with java8 and the resulting
|
||||
code won't compile with java7. If you use java7, make sure to enable `java7compatibility` for this rule to avoid
|
||||
code won't compile with java7. If you use java7, make sure to enable `java7Compatibility` for this rule to avoid
|
||||
false positives.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
@ -2009,17 +2009,17 @@ false positives.
|
||||
|
|
||||
//StatementExpression[AssignmentOperator and PrimaryExpression/PrimaryPrefix[not(Expression)]]
|
||||
)
|
||||
/(Expression | Expression[$java7compatibility = false()]/ConditionalExpression | Expression[$java7compatibility = false()]/ConditionalExpression/Expression)
|
||||
/(Expression | Expression[$java7Compatibility = false()]/ConditionalExpression | Expression[$java7compatibility = false()]/ConditionalExpression/Expression)
|
||||
/PrimaryExpression[not(PrimarySuffix) and not(ancestor::ArgumentList)]
|
||||
/PrimaryPrefix
|
||||
/AllocationExpression
|
||||
[@AnonymousClass=false()]
|
||||
[ClassOrInterfaceType/TypeArguments[@Diamond=false() and not($java7compatibility = true() and .//TypeArgument[@Wildcard=true()])]]
|
||||
[ClassOrInterfaceType/TypeArguments[@Diamond=false() and not($java7Compatibility = true() and .//TypeArgument[@Wildcard=true()])]]
|
||||
[not(ArrayDimsAndInits)]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
<property name="java7compatibility" type="Boolean" description="If disabled, the rule shows also violations that are applicable for java8+" value="false" />
|
||||
<property name="java7Compatibility" type="Boolean" description="If disabled, the rule shows also violations that are applicable for java8+" value="false" />
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
|
@ -145,7 +145,7 @@ class Foo {
|
||||
|
||||
<test-code>
|
||||
<description>(J7) Version sensitive tests - avoid possible false positives on Java7</description>
|
||||
<rule-property name="java7compatibility">true</rule-property>
|
||||
<rule-property name="java7Compatibility">true</rule-property>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
import java.lang.ref.WeakReference;
|
||||
@ -188,7 +188,7 @@ public class Foo {
|
||||
|
||||
<test-code>
|
||||
<description>False negative for nested type parameters (#2545)</description>
|
||||
<rule-property name="java7compatibility">true</rule-property>
|
||||
<rule-property name="java7Compatibility">true</rule-property>
|
||||
<expected-problems>3</expected-problems>
|
||||
<expected-linenumbers>7,8,17</expected-linenumbers>
|
||||
<code><![CDATA[
|
||||
|
Reference in New Issue
Block a user