From 011bf6292d51c0e557abc1b9fae84b087b13c9af Mon Sep 17 00:00:00 2001 From: "Travis CI (pmd-bot)" Date: Tue, 25 Aug 2020 13:06:16 +0000 Subject: [PATCH] Update documentation TRAVIS_JOB_NUMBER=5791.2 TRAVIS_COMMIT_RANGE=8689864ad1f3...8c3277b8a2e3 --- feed.xml | 4 ++-- pmd_release_notes.html | 4 ++++ pmd_rules_java.html | 2 +- pmd_rules_java_errorprone.html | 8 ++++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/feed.xml b/feed.xml index bdd9a6b3c2..5f73e66302 100644 --- a/feed.xml +++ b/feed.xml @@ -5,8 +5,8 @@ Intended as a documentation theme based on Jekyll for technical writers documenting software and other technical products, this theme has all the elements you would need to handle multiple products with both multi-level sidebar navigation, tags, and other documentation features. https://pmd.github.io/pmd/ - Tue, 25 Aug 2020 12:44:10 +0000 - Tue, 25 Aug 2020 12:44:10 +0000 + Tue, 25 Aug 2020 13:03:31 +0000 + Tue, 25 Aug 2020 13:03:31 +0000 Jekyll v3.9.0 diff --git a/pmd_release_notes.html b/pmd_release_notes.html index a65288dabe..f3430982b1 100644 --- a/pmd_release_notes.html +++ b/pmd_release_notes.html @@ -1516,6 +1516,7 @@ which was introduced in PMD 6.26.0.
  • java-errorprone
      +
    • #2264: [java] SuspiciousEqualsMethodName: Improve description about error-prone overloading of equals()
    • #2410: [java] ProperCloneImplementation not valid for final class
    • #2431: [java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message
    • #2439: [java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t)
    • @@ -1614,13 +1615,16 @@ are deprecated as internal API.
    • #2700: [java] Fix OnlyOneReturn code example - Jan-Lukas Else
    • #2722: [doc] [java] ImmutableField: extend description, fixes #2108 - Mateusz Stefanski
    • #2723: [doc] [java] SimplifyStartsWith: update description and example, fixes #1868 - Mateusz Stefanski
    • +
    • #2724: [doc] [java] SuspiciousEqualsMethodName: update description, fixes #2264 - Mateusz Stefanski
    • #2725: Cleanup: change valueOf to parse when we need primitive return value. - XenoAmess
    • #2726: Cleanup: replace StringBuffer with StringBuilder - XenoAmess
    • #2727: Cleanup: replace indexOf() < 0 with contains - XenoAmess
    • #2728: Cleanup: javadoc issues - XenoAmess
    • #2729: Cleanup: use print instead of printf if no format exists - XenoAmess
    • +
    • #2730: Cleanup: StringBuilder issues - XenoAmess
    • #2731: Cleanup: avoid compiling Patterns repeatedly - XenoAmess
    • #2732: Cleanup: use StandardCharsets instead of Charset.forName - XenoAmess
    • +
    • #2733: Cleanup: Collection::addAll issues - XenoAmess
    • #2734: Cleanup: use try with resources - XenoAmess
    diff --git a/pmd_rules_java.html b/pmd_rules_java.html index 5f64ed6a3f..71e658c641 100644 --- a/pmd_rules_java.html +++ b/pmd_rules_java.html @@ -1690,7 +1690,7 @@ $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3
  • SingletonClassReturningNewInstance: Some classes contain overloaded getInstance. The problem with overloaded getInstance methods is t…
  • StaticEJBFieldShouldBeFinal: According to the J2EE specification, an EJB should not have any static fields with write access. …
  • StringBufferInstantiationWithChar: Individual character values provided as initialization arguments will be converted into integers….
  • -
  • SuspiciousEqualsMethodName: The method name and parameter number are suspiciously close to equals(Object), which can denote a…
  • +
  • SuspiciousEqualsMethodName: The method name and parameter number are suspiciously close to ‘Object.equals’, which can denote …
  • SuspiciousHashcodeMethodName: The method name and return type are suspiciously close to hashCode(), which may denote an intenti…
  • SuspiciousOctalEscape: A suspicious octal escape sequence was found inside a String literal. The Java language specifica…
  • TestClassWithoutTestCases: Test classes end with the suffix Test. Having a non-test class with that name is not a good pract…
  • diff --git a/pmd_rules_java_errorprone.html b/pmd_rules_java_errorprone.html index 68c8ecc96e..ee36540644 100644 --- a/pmd_rules_java_errorprone.html +++ b/pmd_rules_java_errorprone.html @@ -4671,8 +4671,12 @@ new StringBuilder("A") // 1 + 16 = 17

    Priority: Medium High (2)

    -

    The method name and parameter number are suspiciously close to equals(Object), which can denote an -intention to override the equals(Object) method.

    +

    The method name and parameter number are suspiciously close to Object.equals, which can denote an +intention to override it. However, the method does not override Object.equals, but overloads it instead. +Overloading Object.equals method is confusing for other programmers, error-prone and hard to maintain, +especially when using inheritance, because @Override annotations used in subclasses can provide a false +sense of security. For more information on Object.equals method, see Effective Java, 3rd Edition, +Item 10: Obey the general contract when overriding equals.

    This rule is defined by the following XPath expression:

    //MethodDeclaration[@Name = 'equals']