forked from phoedos/pmd
#1277 Delete BooleanInversion as it makes no sense
Deprecate the rule for now - to be completely deleted later
This commit is contained in:
@ -296,15 +296,23 @@ or MethodDeclaration[@PackagePrivate='true']
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<rule name="BooleanInversion"
|
||||
language="java"
|
||||
<rule deprecated="true"
|
||||
name="BooleanInversion"
|
||||
language="java"
|
||||
since="3.5"
|
||||
message="Use bitwise inversion to invert boolean values"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/rules/java/controversial.html#BooleanInversion">
|
||||
<description>
|
||||
<![CDATA[
|
||||
**Note:** This rule is deprecated as nowadays the JVMs JIT compilers will optimize away the differences.
|
||||
While the bytecode generated by the java compiler is indeed different, at runtime the instructions
|
||||
are optimized to the fastest way automatically.
|
||||
See <https://sourceforge.net/p/pmd/bugs/1277/> for more details.
|
||||
|
||||
Use bitwise inversion to invert boolean values - it's the fastest way to do this.
|
||||
See http://www.javaspecialists.co.za/archive/newsletter.do?issue=042&locale=en_US for specific details
|
||||
See <http://www.javaspecialists.eu/archive/Issue042.html> for specific details
|
||||
]]>
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
|
@ -33,6 +33,9 @@ The following rules are marked as **deprecated** and will be removed with the ne
|
||||
* Language Java, ruleset design.xml: The rule "UncommentedEmptyMethod" *has been renamed* to "UncommentedEmptyMethodBody".
|
||||
See also bug [#1283](https://sourceforge.net/p/pmd/bugs/1283/).
|
||||
|
||||
* Language Java, ruleset controversial.xml: The rule "BooleanInversion" is deprecated and *will be removed* with
|
||||
the next release. See [#1277](https://sourceforge.net/p/pmd/bugs/1277/) for more details.
|
||||
|
||||
|
||||
**Pull Requests:**
|
||||
|
||||
@ -53,6 +56,7 @@ The following rules are marked as **deprecated** and will be removed with the ne
|
||||
**Bugfixes:**
|
||||
|
||||
* [#914](https://sourceforge.net/p/pmd/bugs/914/): False +ve from UnusedImports with wildcard static imports
|
||||
* [#1277](https://sourceforge.net/p/pmd/bugs/1277/): Delete BooleanInversion as it makes no sense
|
||||
* [#1283](https://sourceforge.net/p/pmd/bugs/1283/): Rename UncommentedEmptyMethod to UncommentedEmptyMethodBody
|
||||
* [#1296](https://sourceforge.net/p/pmd/bugs/1296/): PMD UnusedPrivateMethod invalid detection of 'private void method(int,boolean,Integer...)'
|
||||
* [#1298](https://sourceforge.net/p/pmd/bugs/1298/): Member variable int type with value 0xff000000 causes processing error
|
||||
|
Reference in New Issue
Block a user