<?xml version="1.0" encoding="UTF-8"?>

<document xmlns="http://maven.apache.org/XDOC/2.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">

  <head>
    <title>Coding</title>
    <script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
    <script type="text/javascript" src="js/anchors.js"/>
    <script type="text/javascript" src="js/google-analytics.js"/>
    <link rel="icon" href="images/favicon.png" type="image/x-icon" />
    <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" />
  </head>

  <body>
    <section name="Content">
      <macro name="toc">
        <param name="fromDepth" value="1"/>
        <param name="toDepth" value="1"/>
      </macro>
    </section>

    <section name="ArrayTrailingComma">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="ArrayTrailingComma_Description">
        <p>
          Checks that array initialization contains a trailing comma.
        </p>
        <source>
int[] a = new int[]
{
  1,
  2,
  3,
};
        </source>

        <p>
          The check demands a comma at the end if neither left nor right curly braces
          are on the same line as the last element of the array.
        </p>
        <source>
return new int[] { 0 };
return new int[] { 0
  };
return new int[] {
  0 };
        </source>

        <p>
          Rationale: Putting this comma in makes it easier to change the order
          of the elements or add new elements on the end. Main benefit of a trailing
          comma is that when you add new entry to an array, no surrounding lines are changed.
        </p>
        <source>
{
  100000000000000000000,
  200000000000000000000, // OK
}

{
  100000000000000000000,
  200000000000000000000,
  300000000000000000000,  // Just this line added, no other changes
}
        </source>
        <p>
          If closing brace is on the same line as training comma, this benefit is gone
          (as the check does not demand a certain location of curly braces the following
          two cases will not produce a violation):
        </p>
        <source>
{100000000000000000000,
 200000000000000000000,} // Trailing comma not needed, line needs to be modified anyway

{100000000000000000000,
 200000000000000000000, // Modified line
 300000000000000000000,} // Added line
        </source>
        <p>
          If opening brace is on the same line as training comma there's also (more arguable)
          problem:
        </p>
        <source>
{100000000000000000000, // Line cannot be just duplicated to slightly modify entry
}

{100000000000000000000,
 100000000000000000001, // More work needed to duplicate
}
        </source>
      </subsection>

      <subsection name="Examples" id="ArrayTrailingComma_Examples">
          <p>
          To configure the check:
          </p>
          <source>
&lt;module name=&quot;ArrayTrailingComma&quot;/&gt;
          </source>
          <p>
            Which results in the following violations:
          </p>
          <source>
int[] numbers = {1, 2, 3};        //no violation
boolean[] bools = {
true,
true,
false
};        //violation

String[][] text = {{},{},};        //no violation

double[][] decimals = {
{0.5, 2.3, 1.1,},        //no violation
{1.7, 1.9, 0.6},
{0.8, 7.4, 6.5}
};        // violation as previous line misses a comma

char[] chars = {'a', 'b', 'c'
  };        / /no violation

String[] letters = {
  "a", "b", "c"};        // no violation

int[] a1 = new int[]{
  1,
  2
  ,
};        // no violation

int[] a2 = new int[]{
  1,
  2
  ,};        // no violation
          </source>
      </subsection>

      <subsection name="Example of Usage" id="ArrayTrailingComma_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ArrayTrailingComma">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="ArrayTrailingComma_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22array.trailing.comma%22">
            array.trailing.comma</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="ArrayTrailingComma_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="ArrayTrailingComma_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="AvoidInlineConditionals">
      <p>Since Checkstyle 3.1</p>
      <subsection name="Description" id="AvoidInlineConditionals_Description">
        <p>
          Detects inline conditionals. Here is one example of an inline conditional:
        </p>
        <source>
String a = getParameter("a");
String b = (a==null || a.length()&lt;1) ? null : a.substring(1);
        </source>

        <p>
          Rationale: Some developers find inline conditionals hard to read, so
          their employer's coding standards forbid them.
        </p>
      </subsection>

      <subsection name="Examples" id="AvoidInlineConditionals_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;AvoidInlineConditionals&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="AvoidInlineConditionals_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+AvoidInlineConditionals">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="AvoidInlineConditionals_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22inline.conditional.avoid%22">
            inline.conditional.avoid</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="AvoidInlineConditionals_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="AvoidInlineConditionals_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="AvoidNoArgumentSuperConstructorCall">
      <p>Since Checkstyle 8.29</p>
      <subsection name="Description" id="AvoidNoArgumentSuperConstructorCall_Description">
        <p>
          Checks if call to superclass constructor without arguments is present.
          Such invocation is redundant because constructor body implicitly
          begins with a superclass constructor invocation <code>super();</code>
          See <a href="https://docs.oracle.com/javase/specs/jls/se13/html/jls-8.html#jls-8.8.7">
          specification</a> for detailed information.
        </p>
      </subsection>

      <subsection name="Examples" id="AvoidNoArgumentSuperConstructorCall_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;AvoidNoArgumentSuperConstructorCall&quot;/&gt;
        </source>
        <p>
          Example of violations
        </p>
        <source>
class MyClass extends SomeOtherClass {
    MyClass() {
        super(); // violation
    }

    MyClass(int arg) {
        super(arg); // OK, call with argument have to be explicit
    }

    MyClass(long arg) {
        // OK, call is implicit
    }
}
        </source>
      </subsection>

      <subsection name="Example of Usage" id="AvoidNoArgumentSuperConstructorCall_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+AvoidNoArgumentSuperConstructorCall">
              Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages"
                  id="AvoidNoArgumentSuperConstructorCall_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22super.constructor.call%22">
              super.constructor.call</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="AvoidNoArgumentSuperConstructorCall_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="AvoidNoArgumentSuperConstructorCall_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="CovariantEquals">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="CovariantEquals_Description">
        <p>
          Checks that classes which define a covariant <code>equals()</code> method
          also override method <code>equals(Object)</code>.
        </p>
        <p>
          Covariant <code>equals()</code> - method that is similar to <code>equals(Object)</code>,
          but with a covariant parameter type (any subtype of Object).
        </p>
        <p>
          <strong>Notice</strong>: the enums are also checked, even
          though they cannot override <code>equals(Object)</code>. The reason is
          to point out that implementing <code>equals()</code> in enums is considered an
          awful practice: it may cause having two different enum values that are equal using
          covariant enum method, and not equal when compared normally.
        </p>

        <p>
          Inspired by <a href="https://www.cs.jhu.edu/~daveho/pubs/oopsla2004.pdf">
          Finding Bugs is Easy, chapter '4.5 Bad Covariant Definition of Equals (Eq)'</a>:
        </p>

        <p>
          Java classes may override the <code>equals(Object)</code> method to define
          a predicate for object equality. This method is used by many of the Java runtime
          library classes; for example, to implement generic containers.
        </p>

        <p>
          Programmers sometimes mistakenly use the type of their class <code>Foo</code>
          as the type of the parameter to <code>equals()</code>:
        </p>

        <source>
public boolean equals(Foo obj) {...}
        </source>

        <p>
          This covariant version of <code>equals()</code> does not override the version in the
          <code>Object</code> class, and it may lead to unexpected behavior at runtime,
          especially if the class is used with one of the standard collection classes
          which expect that the standard <code>equals(Object)</code> method is overridden.
        </p>

        <p>
          This kind of bug is not obvious because it looks correct, and in circumstances where
          the class is accessed through the references of the class type (rather than a supertype),
          it will work correctly. However, the first time it is used in a container,
          the behavior might be mysterious. For these reasons, this type of bug can elude
          testing and code inspections.
        </p>
      </subsection>

      <subsection name="Examples" id="CovariantEquals_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;CovariantEquals&quot;/&gt;
        </source>

        <p>
          For example:
        </p>
        <source>
class Test {
  public boolean equals(Test i) {  // violation
    return false;
  }
}
        </source>
        <p>
          The same class without violations:
        </p>
        <source>
class Test {
  public boolean equals(Test i) {  // no violation
    return false;
  }

  public boolean equals(Object i) {
    return false;
  }
}
        </source>
      </subsection>

      <subsection name="Example of Usage" id="CovariantEquals_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+CovariantEquals">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="CovariantEquals_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22covariant.equals%22">
            covariant.equals</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="CovariantEquals_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="CovariantEquals_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="DeclarationOrder">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="DeclarationOrder_Description">
        <p>
          Checks that the parts of a class or interface declaration appear in the order
          suggested by the
          <a href="https://checkstyle.org/styleguides/sun-code-conventions-19990420/CodeConventions.doc2.html#a1852">
            Code Conventions for the Java Programming Language</a>.
        </p>
        <p>
          According to <a
          href="styleguides/sun-code-conventions-19990420/CodeConventions.doc2.html#a1852">
          Code Conventions for the Java Programming Language</a> , the parts
          of a class or interface declaration should appear in the following
          order:
        </p>

        <ol>
          <li>
            Class (static) variables. First the public class variables, then
             protected, then package level (no access modifier), and then
             private.
          </li>
          <li>
            Instance variables. First the public class variables, then
            protected, then package level (no access modifier), and then
            private.
          </li>
          <li> Constructors </li>
          <li> Methods </li>
        </ol>

        <p>
          Purpose of <b>ignore*</b> option is to ignore related violations,
          however it still impacts on other class members.
        </p>

        <p>
          ATTENTION: the check skips class fields which have
          <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-8.html#jls-8.3.3">
              forward references</a>
           from validation due to the fact that we have Checkstyle's limitations to clearly
          detect user intention of fields location and grouping. For example:
        </p>
        <source>
public class A {
  private double x = 1.0;
  private double y = 2.0;
  public double slope = x / y; // will be skipped from validation due to forward reference
}
        </source>
      </subsection>

      <subsection name="Properties" id="DeclarationOrder_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>ignoreConstructors</td>
              <td>control whether to ignore constructors.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>5.2</td>
            </tr>
            <tr>
              <td>ignoreModifiers</td>
              <td>control whether to ignore modifiers (fields, ...).</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>5.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="DeclarationOrder_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;DeclarationOrder&quot;/&gt;
        </source>

        <p>
          With default options:
        </p>
        <source>
class K {
  int a;
  void m(){}
  K(){}  &lt;-- "Constructor definition in wrong order"
  int b; &lt;-- "Instance variable definition in wrong order"
}
        </source>
        <p>
          With <b>ignoreConstructors</b> option:
        </p>
        <source>
class K {
  int a;
  void m(){}
  K(){}
  int b; &lt;-- "Instance variable definition in wrong order"
}
        </source>
        <p>
          With <b>ignoreConstructors</b> option and without a method definition in a source class:
        </p>
        <source>
class K {
  int a;
  K(){}
  int b; &lt;-- "Instance variable definition in wrong order"
}
        </source>
      </subsection>

      <subsection name="Example of Usage" id="DeclarationOrder_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+DeclarationOrder">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="DeclarationOrder_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22declaration.order.access%22">
            declaration.order.access</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22declaration.order.constructor%22">
            declaration.order.constructor</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22declaration.order.instance%22">
            declaration.order.instance</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22declaration.order.static%22">
            declaration.order.static</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="DeclarationOrder_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="DeclarationOrder_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="DefaultComesLast">
      <p>Since Checkstyle 3.4</p>
      <subsection name="Description" id="DefaultComesLast_Description">
        <p>
          Check that the <code>default</code> is after all the
          cases in a <code>switch</code> statement.
        </p>

        <p>
          Rationale: Java allows <code>default</code> anywhere
          within the <code>switch</code> statement. But it is
          more readable if it comes after the last <code>case</code>.
        </p>
      </subsection>
      <subsection name="Properties" id="DefaultComesLast_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>skipIfLastAndSharedWithCase</td>
              <td>
                Control whether to allow <code>default</code> along with
                <code>case</code> if they are not last.
              </td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>7.7</td>
            </tr>
          </table>
        </div>
      </subsection>
      <subsection name="Examples" id="DefaultComesLast_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;DefaultComesLast&quot;/&gt;
        </source>
        <p>
            To configure the check for skipIfLastAndSharedWithCase:
        </p>
        <source>
&lt;module name=&quot;DefaultComesLast&quot;&gt;
  &lt;property name=&quot;skipIfLastAndSharedWithCase&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>
            Example when skipIfLastAndSharedWithCase is set to true.
        </p>
        <source>
switch (i) {
  case 1:
    break;
  case 2:
  default: // No violation with the new option is expected
    break;
  case 3:
    break;
}
switch (i) {
  case 1:
    break;
  default: // violation with the new option is expected
  case 2:
    break;
}
        </source>
      </subsection>

      <subsection name="Example of Usage" id="DefaultComesLast_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+DefaultComesLast">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="DefaultComesLast_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22default.comes.last%22">
            default.comes.last</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22default.comes.last.in.casegroup%22">
            default.comes.last.in.casegroup</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="DefaultComesLast_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="DefaultComesLast_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="EmptyStatement">
      <p>Since Checkstyle 3.1</p>
      <subsection name="Description" id="EmptyStatement_Description">
        <p>
          Detects empty statements (standalone <code>";"</code> semicolon).
          Empty statements often introduce bugs that are hard to spot, such as in
        </p>
        <source>
if (someCondition);
  doConditionalStuff();
doUnconditionalStuff();
        </source>
      </subsection>

      <subsection name="Examples" id="EmptyStatement_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;EmptyStatement&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="EmptyStatement_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+EmptyStatement">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+EmptyStatement">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="EmptyStatement_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22empty.statement%22">
            empty.statement</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="EmptyStatement_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="EmptyStatement_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="EqualsAvoidNull">
      <p>Since Checkstyle 5.0</p>
      <subsection name="Description" id="EqualsAvoidNull_Description">
        <p>
          Checks that any combination of String literals
          is on the left side of an <code>equals()</code> comparison.
          Also checks for String literals assigned to some field
          (such as <code>someString.equals(anotherString = "text")</code>).
        </p>

        <p>
          Rationale: Calling the <code>equals()</code>
          method on String literals will avoid a potential
          <code>NullPointerException</code>. Also, it is pretty common to see null
          checks right before equals comparisons, which is not necessary
          in the example below.
        </p>

        <p>
          For example, this code:
        </p>
        <source>
String nullString = null;
nullString.equals(&quot;My_Sweet_String&quot;);
        </source>

        <p>should be refactored to:</p>

        <source>
String nullString = null;
&quot;My_Sweet_String&quot;.equals(nullString);
        </source>
      </subsection>

      <subsection name="Properties" id="EqualsAvoidNull_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>ignoreEqualsIgnoreCase</td>
              <td>
                Control whether to ignore <code>String.equalsIgnoreCase(String)</code> invocations.
              </td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>5.4</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="EqualsAvoidNull_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;EqualsAvoidNull&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="EqualsAvoidNull_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+EqualsAvoidNull">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="EqualsAvoidNull_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22equals.avoid.null%22">
            equals.avoid.null</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22equalsIgnoreCase.avoid.null%22">
            equalsIgnoreCase.avoid.null</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="EqualsAvoidNull_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="EqualsAvoidNull_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="EqualsHashCode">
      <p>Since Checkstyle 3.0</p>
      <subsection name="Description" id="EqualsHashCode_Description">
        <p>
          Checks that classes that either override <code>equals()</code>
          or <code>hashCode()</code> also overrides the other.
          This check only verifies that the method declarations match
          <code>Object.equals(Object)</code> and <code>Object.hashCode()</code> exactly to be
          considered an override. This check does not verify invalid method names, parameters
          other than <code>Object</code>, or anything else.
        </p>

        <p>
          Rationale: The contract of <code>equals()</code> and
          <code>hashCode()</code> requires that equal objects
          have the same hashCode. Therefore, whenever you override
          <code>equals()</code> you must override <code>hashCode()</code>
          to ensure that your class can be used in hash-based collections.
        </p>
      </subsection>

      <subsection name="Examples" id="EqualsHashCode_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;EqualsHashCode&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="EqualsHashCode_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+EqualsHashCode">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+EqualsHashCode">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="EqualsHashCode_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22equals.noEquals%22">
            equals.noEquals</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22equals.noHashCode%22">
            equals.noHashCode</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="EqualsHashCode_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="EqualsHashCode_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="ExplicitInitialization">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="ExplicitInitialization_Description">
        <p>
          Checks if any class or object member is explicitly initialized to
          default for its type value (<code>null</code> for
          object references, zero for numeric types and <code>char</code> and <code>false</code> for
          <code>boolean</code>.
        </p>

        <p>
          Rationale: Each instance variable gets initialized twice, to the
          same value. Java initializes each instance variable to its default value
          (<code>0</code> or <code>null</code>) before performing any initialization specified in
          the code. So there is a minor inefficiency.
        </p>
      </subsection>

      <subsection name="Properties" id="ExplicitInitialization_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>onlyObjectReferences</td>
              <td>control whether only explicit initializations made to
                  null for objects should be checked.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>7.8</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="ExplicitInitialization_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;ExplicitInitialization&quot;/&gt;
        </source>

        <p>
          To configure the check so that it only checks
          for objects that explicitly initialize to null:
        </p>
        <source>
&lt;module name=&quot;ExplicitInitialization&quot;&gt;
  &lt;property name=&quot;onlyObjectReferences&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>Example:</p>
        <source>
public class Test {
  private int a = 0;
  private int b = 1;
  private int c = 2;

  private boolean a = true;
  private boolean b = false;
  private boolean c = true;
  private boolean d = false;
  private boolean e = false;

  private A a = new A();
  private A b = null; // violation
  private C c = null; // violation
  private D d = new D();

  int ar1[] = null; // violation
  int ar2[] = new int[];
  int ar3[];
  private Bar&lt;String&gt; bar = null; // violation
  private Bar&lt;String&gt;[] barArray = null; // violation

  public static void main( String [] args ) {
  }
}
        </source>
      </subsection>

      <subsection name="Example of Usage" id="ExplicitInitialization_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ExplicitInitialization">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="ExplicitInitialization_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22explicit.init%22">
            explicit.init</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="ExplicitInitialization_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="ExplicitInitialization_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="FallThrough">
      <p>Since Checkstyle 3.4</p>
      <subsection name="Description" id="FallThrough_Description">
        <p>
          Checks for fall-through in <code>switch</code>
          statements. Finds locations where a <code>case</code>
          <b>contains</b> Java code but lacks a <code>break</code>, <code>return</code>,
          <code>throw</code> or <code>continue</code>
          statement.
        </p>
        <p>
          The check honors special comments to suppress the warning.
          By default the texts
          "fallthru", "fall thru", "fall-thru",
          "fallthrough", "fall through", "fall-through"
          "fallsthrough", "falls through", "falls-through" (case sensitive).
          The comment containing these words must be all on one line,
          and must be on the last non-empty line before the
          <code>case</code> triggering the warning or on
          the same line before the <code>case</code>
          (ugly, but possible).
        </p>
        <source>
switch (i) {
case 0:
  i++; // fall through

case 1:
  i++;
  // falls through
case 2:
case 3:
case 4: {
  i++;
}
// fallthrough
case 5:
  i++;
/* fallthru */case 6:
  i++;
// fall-through
case 7:
  i++;
  break;
}
        </source>
        <p>
          Note: The check assumes that there is no unreachable
          code in the <code>case</code>.
        </p>
        <p>
          The following fragment of code will NOT trigger the check,
          because of the comment "fallthru" or any Java code
          in case 5 are absent.
        </p>
        <div class="wrapper">
          <pre>
case 3:
    x = 2;
    // fallthru
case 4:
case 5: // violation
case 6:
    break;
          </pre>
        </div>
      </subsection>

      <subsection name="Properties" id="FallThrough_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>checkLastCaseGroup</td>
              <td>
                Control whether the last case group must be checked.
              </td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>4.0</td>
            </tr>
            <tr>
              <td>reliefPattern</td>
              <td>
                Define the RegExp to match the relief comment that suppresses
                the warning about a fall through.
              </td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>"falls?[ -]?thr(u|ough)"</code></td>
              <td>4.0</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="FallThrough_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;FallThrough&quot;/&gt;
        </source>
        <p>
          or
        </p>
        <source>
&lt;module name=&quot;FallThrough&quot;&gt;
  &lt;property name=&quot;reliefPattern&quot; value=&quot;continue in next case&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="FallThrough_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+FallThrough">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+FallThrough">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="FallThrough_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22fall.through%22">
            fall.through</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22fall.through.last%22">
            fall.through.last</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="FallThrough_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="FallThrough_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="FinalLocalVariable">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="FinalLocalVariable_Description">
        <p>
          Checks that local variables that never have their values changed are
          declared final. The check can be configured to also check that
          unchanged parameters are declared final.
        </p>
      </subsection>

      <subsection name="Notes" id="FinalLocalVariable_Notes">
        <p>
          When configured to check parameters, the check ignores parameters of
          interface methods and abstract methods.
        </p>
      </subsection>

      <subsection name="Properties" id="FinalLocalVariable_Properties">
        <div class="wrapper">
          <table>
            <tr class="header">
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>validateEnhancedForLoopVariable</td>
              <td>
                Control whether to check
                <a href = "https://docs.oracle.com/javase/specs/jls/se11/html/jls-14.html#jls-14.14.2">
                enhanced for-loop</a> variable.</td>
              <td>
                <a
                href="property_types.html#boolean">Boolean</a>
              </td>
              <td>
               <code>
                false
               </code>
              </td>
              <td>6.5</td>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>
                subset of tokens <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                  VARIABLE_DEF</a>,
                <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">
                  PARAMETER_DEF</a>.
              </td>
              <td>
                <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                  VARIABLE_DEF</a>.
              </td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="FinalLocalVariable_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;FinalLocalVariable&quot;/&gt;
        </source>

        <p>
          To configure the check so that it checks local variables and
          parameters:
        </p>
        <source>
&lt;module name=&quot;FinalLocalVariable&quot;&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;VARIABLE_DEF,PARAMETER_DEF&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>
         By default, this Check skip final validation on
         <a href = "https://docs.oracle.com/javase/specs/jls/se11/html/jls-14.html#jls-14.14.2">
         Enhanced For-Loop</a>.
         </p>
         <p>
         Option 'validateEnhancedForLoopVariable' could be used to make Check to validate
         even variable from Enhanced For Loop.
         </p>
         <p>
         An example of how to configure the check so that it also validates enhanced For Loop
         Variable is:
         </p>
         <source>
&lt;module name="FinalLocalVariable"&gt;
  &lt;property name="tokens" value="VARIABLE_DEF"/&gt;
  &lt;property name="validateEnhancedForLoopVariable" value="true"/&gt;
&lt;/module&gt;
         </source>
         <p>Example:</p>
         <source>
for (int number : myNumbers) { // violation
  System.out.println(number);
}
         </source>
         <p>
         An example of how to configure check on local variables and parameters
         but do not validate loop variables:
         </p>
         <source>
 &lt;module name="FinalLocalVariable"&gt;
   &lt;property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/&gt;
   &lt;property name="validateEnhancedForLoopVariable" value="false"/&gt;
 &lt;/module&gt;
         </source>
         <p>Example:</p>
         <source>
public class MyClass {
  static int foo(int x, int y) { //violations, parameters should be final
    return x+y;
  }
  public static void main (String []args) { //violation, parameters should be final
    for (String i : args) {
      System.out.println(i);
    }
    int result=foo(1,2); // violation
  }
}
         </source>
      </subsection>

      <subsection name="Example of Usage" id="FinalLocalVariable_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+FinalLocalVariable">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="FinalLocalVariable_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22final.variable%22">
            final.variable</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="FinalLocalVariable_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="FinalLocalVariable_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="HiddenField">
      <p>Since Checkstyle 3.0</p>
      <subsection name="Description" id="HiddenField_Description">
        <p>
          Checks that a local variable or a parameter does not shadow a field
          that is defined in the same class.
        </p>
      </subsection>
      <subsection name="Notes" id="HiddenField_Notes">
        <p>
          It is possible to configure the check to ignore all property setter methods.
        </p>
        <p>
          A method is recognized as a setter if it is in the following form
        </p>
        <source>
${returnType} set${Name}(${anyType} ${name}) { ... }
        </source>
        <p>
          where ${anyType} is any primitive type, class or interface name;
          ${name} is name of the variable that is being set and ${Name} its
          capitalized form that appears in the method name. By default it is expected
          that setter returns void, i.e. ${returnType} is 'void'. For example
        </p>
        <source>
void setTime(long time) { ... }
        </source>
        <p>
          Any other return types will not let method match a setter pattern. However,
          by setting <em>setterCanReturnItsClass</em> property to <em>true</em>
          definition of a setter is expanded, so that setter return type can also
          be a class in which setter is declared. For example
        </p>
        <source>
class PageBuilder {
  PageBuilder setName(String name) { ... }
}
        </source>
        <p>
          Such methods are known as chain-setters and a common when Builder-pattern
          is used. Property <em>setterCanReturnItsClass</em> has effect only if
          <em>ignoreSetter</em> is set to true.
        </p>
      </subsection>

      <subsection name="Properties" id="HiddenField_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>ignoreFormat</td>
              <td>Define the RegExp for names of variables and parameters to ignore.</td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>null</code></td>
              <td>3.2</td>
            </tr>

            <tr>
              <td>ignoreConstructorParameter</td>
              <td>Control whether to ignore constructor parameters.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>3.2</td>
            </tr>

            <tr>
              <td>ignoreSetter</td>
              <td>
                Allow to ignore the parameter of a property setter method.
              </td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>3.2</td>
            </tr>

            <tr>
              <td>setterCanReturnItsClass</td>
              <td>
                Allow to expand the definition of a setter method
                to include methods that return the class' instance.
              </td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>6.3</td>
            </tr>

            <tr>
              <td>ignoreAbstractMethods</td>
              <td>Control whether to ignore parameters of abstract methods.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>4.0</td>
            </tr>

            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>
                subset of tokens <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                  VARIABLE_DEF</a>,
                <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">
                  PARAMETER_DEF</a>,
                <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAMBDA">
                  LAMBDA</a>.
              </td>

              <td>
                <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                  VARIABLE_DEF</a>,
                <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">
                  PARAMETER_DEF</a>,
                <a
                href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAMBDA">
                  LAMBDA</a>.
              </td>
              <td>3.0</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="HiddenField_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;HiddenField&quot;/&gt;
        </source>

        <p>
          To configure the check so that it checks local variables but not
          parameters:
        </p>
        <source>
&lt;module name=&quot;HiddenField&quot;&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;VARIABLE_DEF&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it ignores the variables and parameters named
          &quot;test&quot;:
        </p>
        <source>
&lt;module name=&quot;HiddenField&quot;&gt;
  &lt;property name=&quot;ignoreFormat&quot; value=&quot;^test$&quot;/&gt;
&lt;/module&gt;
        </source>

        <source>
class SomeClass
{
  private List&lt;String&gt; test;

  private void addTest(List&lt;String&gt; test) // no violation
  {
    this.test.addAll(test);
  }

  private void foo()
  {
    final List&lt;String&gt; test = new ArrayList&lt;&gt;(); // no violation
    ...
  }
}
        </source>

        <p>
          To configure the check so that it ignores constructor parameters:
        </p>
        <source>
&lt;module name=&quot;HiddenField&quot;&gt;
  &lt;property name=&quot;ignoreConstructorParameter&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it ignores the parameter of setter
          methods:
        </p>
        <source>
&lt;module name=&quot;HiddenField&quot;&gt;
  &lt;property name=&quot;ignoreSetter&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it ignores the parameter of setter
          methods recognizing setter as returning either <code>void</code> or
              a class in which it is declared:
        </p>
        <source>
&lt;module name=&quot;HiddenField&quot;&gt;
  &lt;property name=&quot;ignoreSetter&quot; value=&quot;true&quot;/&gt;
  &lt;property name=&quot;setterCanReturnItsClass&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="HiddenField_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+HiddenField">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+HiddenField">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="HiddenField_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22hidden.field%22">
            hidden.field</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="HiddenField_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="HiddenField_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="IllegalCatch">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="IllegalCatch_Description">
        <p>
        Checks that certain exception types do not appear in a <code>catch</code> statement.
        </p>

        <p>
          Rationale:
          catching <code>java.lang.Exception</code>, <code>java.lang.Error</code> or
          <code>java.lang.RuntimeException</code> is almost never acceptable.
          Novice developers often simply catch Exception in an
          attempt to handle multiple exception classes. This unfortunately
          leads to code that inadvertently catches <code>NullPointerException</code>,
          <code>OutOfMemoryError</code>, etc.
        </p>
      </subsection>

      <subsection name="Properties" id="IllegalCatch_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>illegalClassNames</td>
              <td>Specify exception class names to reject.</td>
              <td><a href="property_types.html#stringSet">String Set</a></td>
              <td><code>Error, Exception, RuntimeException, Throwable, java.lang.Error,
                java.lang.Exception, java.lang.RuntimeException, java.lang.Throwable</code></td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="IllegalCatch_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;IllegalCatch&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="IllegalCatch_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalCatch">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="IllegalCatch_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.catch%22">
            illegal.catch</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="IllegalCatch_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="IllegalCatch_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="IllegalInstantiation">
      <p>Since Checkstyle 3.0</p>
      <subsection name="Description" id="IllegalInstantiation_Description">
        <p>
          Checks for illegal instantiations where a factory method is
          preferred.
        </p>

        <p>
          Rationale: Depending on the project, for some classes it might be
          preferable to create instances through factory methods rather than
          calling the constructor.
        </p>

        <p>
          A simple example is the <code>java.lang.Boolean</code>
          class. For performance reasons, it is preferable to
          use the predefined constants <code> TRUE</code> and
          <code>FALSE</code>. Constructor invocations should be
          replaced by calls to <code>Boolean.valueOf()</code>.
        </p>

        <p>
          Some extremely performance sensitive projects may require the use of
          factory methods for other classes as well, to enforce the usage of
          number caches or object pools.
        </p>
      </subsection>

      <subsection name="Notes" id="IllegalInstantiation_Notes">
        <p>
          There is a limitation that it is currently not possible to specify
          array classes.
        </p>
      </subsection>

      <subsection name="Properties" id="IllegalInstantiation_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>classes</td>
              <td>Specify fully qualified class names that should not be instantiated.</td>
              <td><a href="property_types.html#stringSet">String Set</a></td>
              <td><code>{}</code></td>
              <td>3.0</td>
            </tr>

            <tr>
              <td>tokens</td>
              <td>tokens to check</td>

              <td>
                subset of tokens
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
                CLASS_DEF</a>.
              </td>

              <td>
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
                CLASS_DEF</a>.
              </td>
              <td>3.0</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="IllegalInstantiation_Examples">
        <p>
          To configure the check to find instantiations of <code>java.lang.Boolean</code>:
        </p>
        <source>
&lt;module name=&quot;IllegalInstantiation&quot;&gt;
  &lt;property name=&quot;classes&quot; value=&quot;java.lang.Boolean&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="IllegalInstantiation_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalInstantiation">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalInstantiation">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="IllegalInstantiation_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22instantiation.avoid%22">
            instantiation.avoid</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="IllegalInstantiation_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="IllegalInstantiation_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="IllegalThrows">
      <p>Since Checkstyle 4.0</p>
      <subsection name="Description" id="IllegalThrows_Description">
        <p>
          Checks that specified types are not declared to be thrown.
          Declaring that a method throws <code>java.lang.Error</code> or
          <code>java.lang.RuntimeException</code> is almost never acceptable.
        </p>
      </subsection>

      <subsection name="Properties" id="IllegalThrows_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>illegalClassNames</td>
              <td>Specify throw class names to reject.</td>
              <td><a href="property_types.html#stringSet">String Set</a></td>
              <td><code>Error, RuntimeException, Throwable, java.lang.Error,
                java.lang.RuntimeException, java.lang.Throwable</code>
              </td>
              <td>4.0</td>
            </tr>
            <tr>
              <td>ignoredMethodNames</td>
              <td>Specify names of methods to ignore.</td>
              <td><a href="property_types.html#stringSet">String Set</a></td>
              <td><code>finalize</code></td>
              <td>5.4</td>
            </tr>
            <tr>
              <td>ignoreOverriddenMethods</td>
              <td>
                allow to ignore checking overridden methods (marked with <code>Override</code>
                or <code>java.lang.Override</code> annotation).
              </td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>6.4</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="IllegalThrows_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;IllegalThrows&quot;/&gt;
        </source>
        <p>
          To configure the check rejecting throws NullPointerException from methods:
        </p>
        <source>
&lt;module name=&quot;IllegalThrows&quot;&gt;
  &lt;property name=&quot;illegalClassNames&quot; value=&quot;NullPointerException&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>
          To configure the check ignoring method named &quot;foo()&quot;:
        </p>
        <source>
&lt;module name=&quot;IllegalThrows&quot;&gt;
  &lt;property name=&quot;ignoredMethodNames&quot; value=&quot;foo&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>
          To configure the check to warn on overridden methods:
        </p>
        <source>
&lt;module name=&quot;IllegalThrows&quot;&gt;
  &lt;property name=&quot;ignoreOverriddenMethods&quot; value=&quot;false&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="IllegalThrows_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalThrows">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="IllegalThrows_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.throw%22">
            illegal.throw</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="IllegalThrows_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="IllegalThrows_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="IllegalToken">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="IllegalToken_Description">
        <p>
          Checks for illegal tokens. By default labels are prohibited.
        </p>

        <p>
          Rationale: Certain language features can harm readability, lead to
          confusion or are not obvious to novice developers. Other features
          may be discouraged in certain frameworks, such as not having
          native methods in Enterprise JavaBeans components.
        </p>
      </subsection>

      <subsection name="Properties" id="IllegalToken_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>
                subset of tokens
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>.
              </td>
              <td>
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LABELED_STAT">LABELED_STAT</a>.
              </td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="IllegalToken_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;IllegalToken&quot;/&gt;
        </source>
        <p>
          To configure the check to find token LITERAL_NATIVE:
        </p>
        <source>
&lt;module name=&quot;IllegalToken&quot;&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;LITERAL_NATIVE&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="IllegalToken_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalToken">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="IllegalToken_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.token%22">
            illegal.token</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="IllegalToken_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="IllegalToken_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="IllegalTokenText">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="IllegalTokenText_Description">
        <p>
          Checks specified tokens text for matching an illegal pattern.
          By default no tokens are specified.
        </p>
      </subsection>

      <subsection name="Properties" id="IllegalTokenText_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>format</td>
              <td>Define the RegExp for illegal pattern.</td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>&quot;^$&quot; (empty)</code></td>
              <td>3.2</td>
            </tr>
            <tr>
              <td>ignoreCase</td>
              <td>Control whether to ignore case when matching.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>3.2</td>
            </tr>
            <tr>
              <td>message</td>
              <td>Define the message which is used to notify about violations;
              if empty then the default message is used.</td>
              <td><a href="property_types.html#string">String</a></td>
              <td><code>&quot;&quot;</code></td>
              <td>3.2</td>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>subset of tokens
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_DOUBLE">
                  NUM_DOUBLE</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_FLOAT">
                  NUM_FLOAT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_INT">
                  NUM_INT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_LONG">
                  NUM_LONG</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IDENT">
                  IDENT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMMENT_CONTENT">
                  COMMENT_CONTENT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STRING_LITERAL">
                  STRING_LITERAL</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CHAR_LITERAL">
                  CHAR_LITERAL</a>.
              </td>
              <td>empty</td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="IllegalTokenText_Examples">
        <p>
          To configure the check to forbid String literals containing
          <code>&quot;a href&quot;</code>:
        </p>
        <source>
&lt;module name=&quot;IllegalTokenText&quot;&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;STRING_LITERAL&quot;/&gt;
  &lt;property name=&quot;format&quot; value=&quot;a href&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check to forbid leading zeros in an integer
          literal, other than zero and a hex literal:
        </p>
        <source>
&lt;module name=&quot;IllegalTokenText&quot;&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;NUM_INT,NUM_LONG&quot;/&gt;
  &lt;property name=&quot;format&quot; value=&quot;^0[^lx]&quot;/&gt;
  &lt;property name=&quot;ignoreCase&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="IllegalTokenText_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalTokenText">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalTokenText">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="IllegalTokenText_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.token.text%22">
            illegal.token.text</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="IllegalTokenText_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="IllegalTokenText_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="IllegalType">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="IllegalType_Description">
        <p>
          Checks that particular classes or interfaces are never used.
        </p>

        <p>
          Rationale: Helps reduce coupling on concrete classes.
        </p>
        <p>
          For additional restriction of type usage see also:
          <a href="config_coding.html#IllegalInstantiation">IllegalInstantiation</a>,
          <a href="config_imports.html#IllegalImport">IllegalImport</a>
        </p>
      </subsection>

      <subsection name="Properties" id="IllegalType_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>validateAbstractClassNames</td>
              <td>Control whether to validate abstract class names.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>6.10</td>
            </tr>
            <tr>
              <td>illegalClassNames</td>
              <td>Specify classes that should not be used as types in variable
              declarations, return values or parameters.</td>
              <td><a href="property_types.html#stringSet">String Set</a></td>
              <td><code>HashMap, HashSet, LinkedHashMap, LinkedHashSet, TreeMap, TreeSet,
                java.util.HashMap, java.util.HashSet, java.util.LinkedHashMap,
                java.util.LinkedHashSet, java.util.TreeMap, java.util.TreeSet</code></td>
              <td>3.2</td>
            </tr>
            <tr>
            <td>legalAbstractClassNames</td>
            <td>Define abstract classes that may be used as types. </td>
            <td><a href="property_types.html#stringSet">String Set</a></td>
            <td><code>{}</code></td>
            <td>4.2</td>
          </tr>
          <tr>
              <td>ignoredMethodNames</td>
              <td>Specify methods that should not be checked.</td>
              <td><a href="property_types.html#stringSet">String Set</a></td>
              <td><code>getEnvironment, getInitialContext</code></td>
              <td>3.2</td>
            </tr>
            <tr>
              <td>illegalAbstractClassNameFormat</td>
              <td>Specify RegExp for illegal abstract class names.</td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>"^(.*[.])?Abstract.*$"</code></td>
              <td>3.2</td>
            </tr>
            <tr>
              <td>memberModifiers</td>
              <td>
                Control whether to check only methods and fields with any of the specified
                modifiers. This property does not affect method calls nor method references.
              </td>
              <td>subset of tokens
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>
              </td>
              <td>no tokens</td>
              <td>6.3</td>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>
                subset of tokens
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
                  ANNOTATION_FIELD_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
                  CLASS_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
                  INTERFACE_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">
                  METHOD_CALL</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
                  METHOD_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_REF">
                  METHOD_REF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">
                  PARAMETER_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                  VARIABLE_DEF</a>.
              </td>
              <td>
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
                  ANNOTATION_FIELD_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
                  CLASS_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
                  INTERFACE_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">
                  METHOD_CALL</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
                  METHOD_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_REF">
                  METHOD_REF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PARAMETER_DEF">
                  PARAMETER_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                  VARIABLE_DEF</a>.
              </td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Notes" id="IllegalType_Notes">
        <p>
          It is possible to set illegal class names via short or
          <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-6.html#jls-6.7">
          canonical</a> name.
          Specifying illegal type invokes analyzing imports and Check puts violations at
          corresponding declarations
          (of variables, methods or parameters). This helps to avoid ambiguous cases, e.g.:
          <code>java.awt.List</code> was set as illegal class name, then, code like:
        </p>
        <div class="wrapper">
          <pre>
import java.util.List;
...
List list; //No violation here
          </pre>
        </div>
        <p>
          will be ok.
        </p>
        <p>
          In most cases it's justified to put following classes to <b>illegalClassNames</b>:
        </p>
        <ul>
          <li>GregorianCalendar</li>
          <li>Hashtable</li>
          <li>ArrayList</li>
          <li>LinkedList</li>
          <li>Vector</li>
        </ul>
        <p>
          as methods that are differ from interface methods are rarely used, so in most cases user
          will benefit from checking for them.
        </p>
      </subsection>

      <subsection name="Examples" id="IllegalType_Examples">
        <p>
          To configure the check so that it ignores getInstance() methods:
        </p>
        <source>
&lt;module name=&quot;IllegalType&quot;&gt;
  &lt;property name=&quot;ignoredMethodNames&quot; value=&quot;getInstance&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>
          To configure the Check so that it verifies only public, protected or static
           methods and fields:
        </p>
        <source>
&lt;module name=&quot;IllegalType&quot;&gt;
  &lt;property name=&quot;memberModifiers&quot; value=&quot;LITERAL_PUBLIC,
   LITERAL_PROTECTED, LITERAL_STATIC&quot;/&gt;
&lt;/module&gt;
        </source>
          <p>
            To configure the check so that it verifies usage of types Boolean and Foo:
          </p>
        <source>
&lt;module name="IllegalType"&gt;
          &lt;property name=&quot;illegalClassNames&quot; value=&quot;Boolean, Foo&quot;/&gt;
&lt;/module&gt;
        </source>

        <source>
public class Test {

  public Set&lt;Boolean&gt; set; // violation
  public java.util.List&lt;Map&lt;Boolean, Foo&gt;&gt; list; // violation

  private void method(List&lt;Foo&gt; list, Boolean value) { // violation
    SomeType.&lt;Boolean&gt;foo(); // violation
    final Consumer&lt;Foo&gt; consumer = Foo&lt;Boolean&gt;::foo; // violation
  }

  public &lt;T extends Boolean, U extends Serializable&gt; void typeParam(T a) {} // violation

  public void fullName(java.util.ArrayList&lt;? super Boolean&gt; a) {} // violation

  public abstract Set&lt;Boolean&gt; shortName(Set&lt;? super Boolean&gt; a); // violation

  public Set&lt;? extends Foo&gt; typeArgument() { // violation
    return new TreeSet&lt;Foo&lt;Boolean&gt;&gt;();
  }

}
        </source>
      </subsection>

      <subsection name="Example of Usage" id="IllegalType_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+IllegalType">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="IllegalType_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22illegal.type%22">
            illegal.type</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="IllegalType_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="IllegalType_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="InnerAssignment">
      <p>Since Checkstyle 3.0</p>
      <subsection name="Description" id="InnerAssignment_Description">
        <p>
          Checks for assignments in subexpressions, such as in
          <code>String s = Integer.toString(i = 2);</code>.
        </p>

        <p>
          Rationale: With the exception of <code>for</code> iterators and assignment in
          <code>while</code> idiom, all assignments should occur in their own top-level statement
          to increase readability. With inner assignments like the one given above, it is difficult
          to see all places where a variable is set.
        </p>

        <p>
          Note: Check allows usage of the popular assignment in <code>while</code> idiom:
        </p>
        <source>
String line;
while ((line = bufferedReader.readLine()) != null) {
  // process the line
}
        </source>
        <p>
          Assignment inside a condition is not a problem here, as the assignment is surrounded by
          an extra pair of parentheses. The comparison is <code>!= null</code> and there is no
          chance that intention was to write <code>line == reader.readLine()</code>.
        </p>
      </subsection>

      <subsection name="Examples" id="InnerAssignment_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;InnerAssignment&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="InnerAssignment_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+InnerAssignment">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+InnerAssignment">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="InnerAssignment_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22assignment.inner.avoid%22">
            assignment.inner.avoid</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="InnerAssignment_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="InnerAssignment_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="MagicNumber">
      <p>Since Checkstyle 3.1</p>
      <subsection name="Description" id="MagicNumber_Description">
        <p>
          Checks that there are no
          <a href="https://en.wikipedia.org/wiki/Magic_number_%28programming%29">
          &quot;magic numbers&quot;</a> where a magic
          number is a numeric literal that is not defined as a constant.
          By default, -1, 0, 1, and 2 are not considered to be magic numbers.
        </p>
        <p>
          Constant definition is any variable/field that has 'final' modifier.
          It is fine to have one constant defining multiple numeric literals within one expression:
        </p>
        <source>
static final int SECONDS_PER_DAY = 24 * 60 * 60;
static final double SPECIAL_RATIO = 4.0 / 3.0;
static final double SPECIAL_SUM = 1 + Math.E;
static final double SPECIAL_DIFFERENCE = 4 - Math.PI;
static final Border STANDARD_BORDER = BorderFactory.createEmptyBorder(3, 3, 3, 3);
static final Integer ANSWER_TO_THE_ULTIMATE_QUESTION_OF_LIFE = new Integer(42);
        </source>
      </subsection>

      <subsection name="Properties" id="MagicNumber_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>ignoreNumbers</td>
              <td>Specify non-magic numbers.</td>
              <td><a href="property_types.html#intSet">Number Set</a></td>
              <td><code>-1, 0, 1, 2</code></td>
              <td>3.1</td>
            </tr>
            <tr>
              <td>ignoreHashCodeMethod</td>
              <td>Ignore magic numbers in hashCode methods.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>5.3</td>
            </tr>
            <tr>
              <td>ignoreAnnotation</td>
              <td>Ignore magic numbers in annotation declarations.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
                <td><code>false</code></td>
              <td>5.4</td>
            </tr>
            <tr>
                <td>ignoreFieldDeclaration</td>
                <td>Ignore magic numbers in field declarations.</td>
                <td><a href="property_types.html#boolean">Boolean</a></td>
                <td><code>false</code></td>
                <td>6.6</td>
            </tr>
            <tr>
              <td>ignoreAnnotationElementDefaults</td>
              <td>Ignore magic numbers in annotation elements defaults.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>8.23</td>
            </tr>
            <tr>
                <td>constantWaiverParentToken</td>
                <td>Specify tokens that are allowed in the AST path from the number literal to the
                    enclosing constant definition.</td>
                <td>subset of tokens
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>
                </td>
                <td>
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#TYPECAST">
                  TYPECAST</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_CALL">
                  METHOD_CALL</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EXPR">
                  EXPR</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_INIT">
                  ARRAY_INIT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_MINUS">
                  UNARY_MINUS</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#UNARY_PLUS">
                  UNARY_PLUS</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ELIST">
                  ELIST</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR">
                  STAR</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">
                  ASSIGN</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS">
                  PLUS</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS">
                  MINUS</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV">
                  DIV</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_NEW">
                  LITERAL_NEW</a>
                </td>
                <td>6.11</td>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>subset of tokens
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_DOUBLE">
                  NUM_DOUBLE</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_FLOAT">
                  NUM_FLOAT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_INT">
                  NUM_INT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_LONG">
                  NUM_LONG</a>.
              </td>
              <td>
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_DOUBLE">
                  NUM_DOUBLE</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_FLOAT">
                  NUM_FLOAT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_INT">
                  NUM_INT</a>,
                  <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_LONG">
                  NUM_LONG</a>.
              </td>
              <td>3.1</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="MagicNumber_Examples">
        <p>
          To configure the check with default configuration:
        </p>
        <source>
&lt;module name=&quot;MagicNumber&quot;/&gt;
        </source>
        <p>
          results is following violations:
        </p>
        <source>
@MyAnnotation(6) // violation
class MyClass {
  private field = 7; // violation

  void foo() {
    int i = i + 1; // no violation
    int j = j + 8; // violation
  }
}
@interface anno {
  int value() default 10; // no violation
}
        </source>

        <p>
          To configure the check so that it checks floating-point numbers
          that are not 0, 0.5, or 1:
        </p>
        <source>
&lt;module name=&quot;MagicNumber&quot;&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;NUM_DOUBLE, NUM_FLOAT&quot;/&gt;
  &lt;property name=&quot;ignoreNumbers&quot; value=&quot;0, 0.5, 1&quot;/&gt;
  &lt;property name=&quot;ignoreFieldDeclaration&quot; value=&quot;true&quot;/&gt;
  &lt;property name=&quot;ignoreAnnotation&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>
          results is following violations:
        </p>
        <source>
@MyAnnotation(6) // no violation
class MyClass {
  private field = 7; // no violation

  void foo() {
    int i = i + 1; // no violation
    int j = j + 8; // violation
  }
}
        </source>
        <p>
        To configure the check to check annotation element defaults:
        </p>
        <source>
&lt;module name=&quot;MagicNumber&quot;&gt;
  &lt;property name=&quot;ignoreAnnotationElementDefaults&quot; value=&quot;false&quot;/&gt;
&lt;/module&gt;
        </source>
        <p>
        results in following violations:
        </p>
        <source>
@interface anno {
  int value() default 10; // violation
  int[] value2() default {10}; // violation
}
        </source>
        <p>
        Config example of constantWaiverParentToken option:
        </p>
        <source>
&lt;module name=&quot;MagicNumber&quot;&gt;
  &lt;property name=&quot;constantWaiverParentToken&quot; value=&quot;ASSIGN,ARRAY_INIT,EXPR,
  UNARY_PLUS, UNARY_MINUS, TYPECAST, ELIST, DIV, PLUS &quot;/&gt;
&lt;/module&gt;
        </source>
        <p>result is following violation:</p>
       <source>
class TestMethodCall {
  public void method2() {
    final TestMethodCall dummyObject = new TestMethodCall(62);    //violation
    final int a = 3;        // ok as waiver is ASSIGN
    final int [] b = {4, 5} // ok as waiver is ARRAY_INIT
    final int c = -3;       // ok as waiver is UNARY_MINUS
    final int d = +4;       // ok as waiver is UNARY_PLUS
    final int e = method(1, 2) // ELIST is there but violation due to METHOD_CALL
    final int x = 3 * 4;    // violation
    final int y = 3 / 4;    // ok as waiver is DIV
    final int z = 3 + 4;    // ok as waiver is PLUS
    final int w = 3 - 4;    // violation
    final int x = (int)(3.4);    //ok as waiver is TYPECAST
  }
}
       </source>

  </subsection>

      <subsection name="Example of Usage" id="MagicNumber_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MagicNumber">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MagicNumber">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="MagicNumber_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22magic.number%22">
            magic.number</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="MagicNumber_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="MagicNumber_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="MissingCtor">
      <p>Since Checkstyle 3.4</p>
      <subsection name="Description" id="MissingCtor_Description">
        <p>
          Checks that classes (except abstract ones) define a constructor and don't
          rely on the default one.
        </p>
      </subsection>

      <subsection name="Examples" id="MissingCtor_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;MissingCtor&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="MissingCtor_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MissingCtor">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="MissingCtor_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22missing.ctor%22">
            missing.ctor</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="MissingCtor_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="MissingCtor_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="MissingSwitchDefault">
      <p>Since Checkstyle 3.1</p>
      <subsection name="Description" id="MissingSwitchDefault_Description">
        <p>
          Checks that switch statement has a <code>default</code> clause.
        </p>

        <p>
          Rationale: It's usually a good idea to introduce a default case in
          every switch statement. Even if the developer is sure that all
          currently possible cases are covered, this should be expressed in
          the default branch, e.g. by using an assertion. This way the code is
          protected against later changes, e.g. introduction of new types in an
          enumeration type.
        </p>
      </subsection>

      <subsection name="Examples" id="MissingSwitchDefault_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;MissingSwitchDefault&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="MissingSwitchDefault_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MissingSwitchDefault">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MissingSwitchDefault">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MissingSwitchDefault">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="MissingSwitchDefault_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22missing.switch.default%22">
            missing.switch.default</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="MissingSwitchDefault_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="MissingSwitchDefault_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="ModifiedControlVariable">
      <p>Since Checkstyle 3.5</p>
      <subsection name="Description" id="ModifiedControlVariable_Description">
        <p>
            Checks that for loop control variables are not modified inside
            the for block. An example is:
        </p>
        <source>
for (int i = 0; i &lt; 1; i++) {
  i++; //violation
}
        </source>
          <p>
            Rationale: If the control variable is modified inside the loop
            body, the program flow becomes more difficult to follow. See
            <a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-14.html#jls-14.14">
            FOR statement</a> specification for more details.
          </p>
        <p>
            Such loop would be suppressed:
        </p>
        <source>
for (int i = 0; i &lt; 10;) {
  i++;
}
        </source>
      </subsection>

       <subsection name="Properties" id="ModifiedControlVariable_Properties">
         <div class="wrapper">
           <table>
             <tr class="header">
               <th>name</th>
               <th>description</th>
               <th>type</th>
               <th>default value</th>
               <th>since</th>
            </tr>

           <tr>
             <td>skipEnhancedForLoopVariable</td>
             <td>Control whether to check
               <a href = "https://docs.oracle.com/javase/specs/jls/se11/html/jls-14.html#jls-14.14.2">
                 enhanced for-loop</a> variable.</td>
             <td>
               <a
                   href="property_types.html#boolean">Boolean</a>
             </td>
             <td>
               <code>
                 false
               </code>
             </td>
             <td>6.8</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="ModifiedControlVariable_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;ModifiedControlVariable&quot;/&gt;
        </source>

        <p>
         By default, This Check validates
         <a href = "https://docs.oracle.com/javase/specs/jls/se11/html/jls-14.html#jls-14.14.2">
         Enhanced For-Loop</a>.
         </p>
         <p>
         Option 'skipEnhancedForLoopVariable' could be used to skip check of variable
         from Enhanced For Loop.
         </p>
         <p>
         An example of how to configure the check so that it skips enhanced For Loop Variable is:
         </p>
         <source>
&lt;module name="ModifiedControlVariable"&gt;
  &lt;property name="skipEnhancedForLoopVariable" value="true"/&gt;
&lt;/module&gt;
         </source>
         <p>Example:</p>
         <source>
for (String line: lines) {
  line = line.trim();   // it will skip this violation
}
         </source>
      </subsection>

      <subsection name="Example of Usage" id="ModifiedControlVariable_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ModifiedControlVariable">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="ModifiedControlVariable_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22modified.control.variable%22">
            modified.control.variable</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="ModifiedControlVariable_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="ModifiedControlVariable_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="MultipleStringLiterals">
      <p>Since Checkstyle 3.5</p>
      <subsection name="Description" id="MultipleStringLiterals_Description">
        <p>
          Checks for multiple occurrences of the same string literal within a
          single file.
        </p>

        <p>
          Rationale: Code duplication makes maintenance more difficult, so it
          can be better to replace the multiple occurrences with a constant.
        </p>
      </subsection>

      <subsection name="Properties" id="MultipleStringLiterals_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>allowedDuplicates</td>
              <td>
                Specify the maximum number of occurrences to allow without generating a
                warning.
              </td>
              <td><a href="property_types.html#integer">Integer</a></td>
              <td><code>1</code></td>
              <td>3.5</td>
            </tr>
            <tr>
              <td>ignoreStringsRegexp</td>
              <td>
                Specify RegExp for ignored strings (with quotation marks).
              </td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>"^""$"</code></td>
              <td>4.0</td>
            </tr>
            <tr>
              <td>ignoreOccurrenceContext</td>
              <td>
                Specify token type names where duplicate strings are ignored even if they don't
                match ignoredStringsRegexp. This allows you to exclude syntactical contexts like
                annotations or static initializers from the check.
              </td>
              <td>
                subset of tokens
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>
              </td>
              <td>
                <code>ANNOTATION</code>
              </td>
              <td>4.4</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="MultipleStringLiterals_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;MultipleStringLiterals&quot;/&gt;
        </source>

        <p>
          To configure the check so that it allows two occurrences of each
          string:
        </p>
        <source>
&lt;module name=&quot;MultipleStringLiterals&quot;&gt;
  &lt;property name=&quot;allowedDuplicates&quot; value=&quot;2&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it ignores ", " and empty strings:
        </p>
        <source>
&lt;module name=&quot;MultipleStringLiterals&quot;&gt;
  &lt;property name=&quot;ignoreStringsRegexp&quot;
    value='^((&quot;&quot;)|(&quot;, &quot;))$'/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it flags duplicate strings in all
          syntactical contexts, even in annotations like
          <code>@SuppressWarnings("unchecked")</code>:
        </p>
        <source>
&lt;module name=&quot;MultipleStringLiterals&quot;&gt;
  &lt;property name=&quot;ignoreOccurrenceContext&quot; value=&quot;&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="MultipleStringLiterals_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MultipleStringLiterals">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="MultipleStringLiterals_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22multiple.string.literal%22">
            multiple.string.literal</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="MultipleStringLiterals_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="MultipleStringLiterals_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="MultipleVariableDeclarations">
      <p>Since Checkstyle 3.4</p>
      <subsection name="Description" id="MultipleVariableDeclarations_Description">
        <p>
          Checks that each variable declaration is in its own statement and on
          its own line.
        </p>

        <p>
          Rationale: <a
          href="styleguides/sun-code-conventions-19990420/CodeConventions.doc5.html#a2992">
          the Java code conventions chapter 6.1</a> recommends that
          declarations should be one per line/statement.
        </p>
      </subsection>

      <subsection name="Examples" id="MultipleVariableDeclarations_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;MultipleVariableDeclarations&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="MultipleVariableDeclarations_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MultipleVariableDeclarations">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MultipleVariableDeclarations">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+MultipleVariableDeclarations">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="MultipleVariableDeclarations_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22multiple.variable.declarations%22">
            multiple.variable.declarations</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22multiple.variable.declarations.comma%22">
            multiple.variable.declarations.comma</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="MultipleVariableDeclarations_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="MultipleVariableDeclarations_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="NestedForDepth">
      <p>Since Checkstyle 5.3</p>
      <subsection name="Description" id="NestedForDepth_Description">
        <p>Restricts nested <code>for</code> blocks to a specified depth.</p>
      </subsection>

      <subsection name="Properties" id="NestedForDepth_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>max</td>
              <td>Specify maximum allowed nesting depth.</td>
              <td><a href="property_types.html#integer">Integer</a></td>
              <td><code>1</code></td>
              <td>5.3</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="NestedForDepth_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;NestedForDepth&quot;/&gt;
        </source>

        <p>
          To configure the check to allow nesting depth 3:
        </p>
        <source>
&lt;module name=&quot;NestedForDepth&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;3&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="NestedForDepth_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NestedForDepth">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="NestedForDepth_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22nested.for.depth%22">
            nested.for.depth</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="NestedForDepth_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="NestedForDepth_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="NestedIfDepth">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="NestedIfDepth_Description">
        <p>Restricts nested if-else blocks to a specified depth.</p>
      </subsection>

      <subsection name="Properties" id="NestedIfDepth_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>max</td>
              <td>Specify maximum allowed nesting depth.</td>
              <td><a href="property_types.html#integer">Integer</a></td>
              <td><code>1</code></td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="NestedIfDepth_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;NestedIfDepth&quot;/&gt;
        </source>

        <p>
          To configure the check to allow nesting depth 3:
        </p>
        <source>
&lt;module name=&quot;NestedIfDepth&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;3&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="NestedIfDepth_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NestedIfDepth">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="NestedIfDepth_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22nested.if.depth%22">
            nested.if.depth</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="NestedIfDepth_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="NestedIfDepth_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="NestedTryDepth">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="NestedTryDepth_Description">
        <p>Restricts nested try-catch-finally blocks to a specified depth.</p>
      </subsection>

      <subsection name="Properties" id="NestedTryDepth_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>max</td>
              <td>Specify maximum allowed nesting depth.</td>
              <td><a href="property_types.html#integer">Integer</a></td>
              <td><code>1</code></td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="NestedTryDepth_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;NestedTryDepth&quot;/&gt;
        </source>

        <p>
          To configure the check to allow nesting depth 3:
        </p>
        <source>
&lt;module name=&quot;NestedTryDepth&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;3&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="NestedTryDepth_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NestedTryDepth">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="NestedTryDepth_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22nested.try.depth%22">
            nested.try.depth</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="NestedTryDepth_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="NestedTryDepth_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="NoArrayTrailingComma">
      <p>Since Checkstyle 8.28</p>
       <subsection name="Description" id="NoArrayTrailingComma_Description">
         <p>
           Checks that array initialization do not contain a trailing comma.
           Rationale: JLS allows trailing commas in arrays and enumerations, but does not allow
           them in other locations. To unify the coding style, the use of trailing commas should
           be prohibited.
         </p>
         <source>
int[] foo = new int[] {
  1,
  2
};
         </source>
         <p>
          The check demands that there should not be any comma after the last element of an array.
         </p>
         <source>
String[] foo = new String[] {
  "FOO",
  "BAR", //violation
}
         </source>
       </subsection>
       <subsection name="Examples" id="NoArrayTrailingComma_Examples">
         <p>
           To configure the check:
         </p>
         <source>
&lt;module name=&quot;NoArrayTrailingComma&quot;/&gt;
         </source>
         <p>
           Which results in the following violations:
         </p>
         <source>
String[] foo1 = {
  "FOO", // OK
  "BAR", // violation
};
String[] foo2 = { "FOO", "BAR", }; // violation
String[] foo3 = {
  "FOO", // OK
  "BAR" // OK
};
String[] foo4 = { "FOO", "BAR" }; // OK
         </source>
       </subsection>
       <subsection name="Example of Usage" id="NoArrayTrailingComma_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NoArrayTrailingComma">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="NoArrayTrailingComma_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22no.array.trailing.comma%22">
            no.array.trailing.comma</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="NoArrayTrailingComma_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="NoArrayTrailingComma_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="NoClone">
      <p>Since Checkstyle 5.0</p>
      <subsection name="Description" id="NoClone_Description">
        <p>
          Checks that the clone method is not overridden from the
          Object class.
        </p>
        <p>
          This check is almost exactly the same as the <code>NoFinalizerCheck</code>.
        </p>
        <p>
          See <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()">
          Object.clone()</a>
        </p>
        <p>
          Rationale: The clone method relies on strange, hard to follow rules that
          are difficult to get right and do not work in all situations.
          In some cases, either a copy constructor
          or a static factory method can be used instead of the clone method
          to return copies of an object.
          For more information on rules for the clone method and its issues, see Effective Java:
          Programming Language Guide First Edition by Joshua Bloch
          pages 45-52.
        </p>
        <p>
          Below are some of the rules/reasons why the clone method should be avoided.
        </p>
        <ul>
          <li>
            Classes supporting the clone method should implement the Cloneable interface
            but the Cloneable interface does not include the clone method.
            As a result, it doesn't enforce the method override.
          </li>
          <li>
            The Cloneable interface forces the Object's clone method to work correctly.
            Without implementing it, the Object's clone method will throw a
            CloneNotSupportedException.
          </li>
          <li>
            Non-final classes must return the object returned from a call to super.clone().
          </li>
          <li>
            Final classes can use a constructor to create a clone which is different
            from non-final classes.
          </li>
          <li>
            If a super class implements the clone method incorrectly all subclasses calling
            super.clone() are doomed to failure.
          </li>
          <li>
            If a class has references to mutable objects then those object references must be
            replaced with copies in the clone method after calling super.clone().
          </li>
          <li>
            The clone method does not work correctly with final mutable object references because
            final references cannot be reassigned.
          </li>
          <li>
            If a super class overrides the clone method then all subclasses must provide a correct
            clone implementation.
          </li>
        </ul>
        <p>
          Two alternatives to the clone method, in some cases, is a copy constructor or a static
          factory method to return copies of an object. Both of these approaches are simpler and
          do not conflict with final fields. They do not force the calling client to handle a
          CloneNotSupportedException.  They also are typed therefore no casting is necessary.
          Finally, they are more flexible since they can take interface types rather than concrete
          classes.
        </p>
        <p>
          Sometimes a copy constructor or static factory is not an acceptable alternative to the
          clone method.  The example below highlights the limitation of a copy constructor
          (or static factory). Assume Square is a subclass for Shape.
        </p>
        <source>
Shape s1 = new Square();
System.out.println(s1 instanceof Square); //true
        </source>
        <p>
          ...assume at this point the code knows nothing of s1 being a Square that's the beauty
          of polymorphism but the code wants to copy the Square which is declared as a Shape,
          its super type...
        </p>
        <source>
Shape s2 = new Shape(s1); //using the copy constructor
System.out.println(s2 instanceof Square); //false
        </source>
        <p>
          The working solution (without knowing about all subclasses and doing many casts) is to do
          the following (assuming correct clone implementation).
        </p>
        <source>
Shape s2 = s1.clone();
System.out.println(s2 instanceof Square); //true
        </source>
        <p>
          Just keep in mind if this type of polymorphic cloning is required then a properly
          implemented clone method may be the best choice.
        </p>
        <p>
          Much of this information was taken from Effective Java: Programming Language Guide First
          Edition by Joshua Bloch pages 45-52.  Give Bloch credit for writing an excellent book.
        </p>
      </subsection>
      <subsection name="Examples" id="NoClone_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;NoClone&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="NoClone_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NoClone">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="NoClone_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22avoid.clone.method%22">
            avoid.clone.method</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="NoClone_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="NoClone_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="NoEnumTrailingComma">
      <p>Since Checkstyle 8.29</p>
      <subsection name="Description" id="NoEnumTrailingComma_Description">
        <p>
          Checks that enum definition does not contain a trailing comma.
          Rationale: JLS allows trailing commas in arrays and enumerations, but does not allow
          them in other locations. To unify the coding style, the use of trailing commas should
          be prohibited.
        </p>
        <source>
enum Foo1 {
  FOO,
  BAR;
}
        </source>
        <p>
          The check demands that there should not be any comma after last constant in
          enum definition.
        </p>
        <source>
enum Foo1 {
  FOO,
  BAR, //violation
}
        </source>
      </subsection>

      <subsection name="Examples" id="NoEnumTrailingComma_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;NoEnumTrailingComma&quot;/&gt;
        </source>
        <p>
          Which results in the following violations:
        </p>
        <source>
enum Foo1 {
  FOO,
  BAR; //OK
}
enum Foo2 {
  FOO,
  BAR //OK
}
enum Foo3 {
  FOO,
  BAR, //violation
}
enum Foo4 {
  FOO,
  BAR, // violation
  ;
}
enum Foo5 {
  FOO,
  BAR,; // violation
}
enum Foo6 { FOO, BAR,; } // violation
enum Foo7 { FOO, BAR, } // violation
enum Foo8 {
  FOO,
  BAR // OK
  ;
}
enum Foo9 { FOO, BAR; } // OK
enum Foo10 { FOO, BAR } // OK
        </source>
      </subsection>

      <subsection name="Example of Usage" id="NoEnumTrailingComma_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NoEnumTrailingComma">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="NoEnumTrailingComma_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22no.enum.trailing.comma%22">
            no.enum.trailing.comma</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="NoEnumTrailingComma_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="NoEnumTrailingComma_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="NoFinalizer">
      <p>Since Checkstyle 5.0</p>
      <subsection name="Description" id="NoFinalizer_Description">
        <p>Checks that there is no method <code>finalize</code> with zero parameters.</p>
        <p>
          See <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()">
          Object.finalize()</a>
        </p>
        <p>
            Rationale: Finalizers are unpredictable, often dangerous, and generally unnecessary.
            Their use can cause erratic behavior, poor performance, and portability problems.
            For more information for the finalize method and its issues, see Effective Java:
            Programming Language Guide Third Edition by Joshua Bloch, &#167;8.
        </p>
      </subsection>

      <subsection name="Examples" id="NoFinalizer_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;NoFinalizer&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="NoFinalizer_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NoFinalizer">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+NoFinalizer">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="NoFinalizer_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22avoid.finalizer.method%22">
            avoid.finalizer.method</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="NoFinalizer_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="NoFinalizer_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="OneStatementPerLine">
      <p>Since Checkstyle 5.3</p>
      <subsection name="Description" id="OneStatementPerLine_Description">
          <p>
          Checks that there is only one statement per line.
          </p>
          <p>
              Rationale: It's very difficult to read multiple statements on one line.
          </p>
          <p>
              In the Java programming language, statements are the fundamental unit of
              execution. All statements except blocks are terminated by a semicolon.
              Blocks are denoted by open and close curly braces.
          </p>
          <p>
              OneStatementPerLineCheck checks the following types of statements:
              variable declaration statements, empty statements, import statements,
              assignment statements, expression statements, increment statements,
              object creation statements, 'for loop' statements, 'break' statements,
              'continue' statements, 'return' statements, resources statements (optional).
          </p>
      </subsection>

      <subsection name="Properties" id="OneStatementPerLine_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>treatTryResourcesAsStatement</td>
              <td>Enable resources processing.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>8.23</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="OneStatementPerLine_Examples">
          <p>
              An example of how to configure this Check:
          </p>
          <source>
              &lt;module name=&quot;OneStatementPerLine&quot;/&gt;
          </source>
          <p>
              The following examples will be flagged as a violation:
          </p>
          <source>
//Each line causes violation:
int var1; int var2;
var1 = 1; var2 = 2;
int var1 = 1; int var2 = 2;
var1++; var2++;
Object obj1 = new Object(); Object obj2 = new Object();
import java.io.EOFException; import java.io.BufferedReader;
;; //two empty statements on the same line.

//Multi-line statements:
int var1 = 1
; var2 = 2; //violation here
int o = 1, p = 2,
r = 5; int t; //violation here
          </source>
          <p>
              An example of how to configure the check to treat resources
              in a try statement as statements to require them on their own line:
          </p>
          <source>
&lt;module name=&quot;OneStatementPerLine&quot;&gt;
  &lt;property name=&quot;treatTryResourcesAsStatement&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;
          </source>
          <p>
              Note: resource declarations can contain variable definitions
              and variable references (from java9).
              When property "treatTryResourcesAsStatement" is enabled,
              this check is only applied to variable definitions.
              If there are one or more variable references
              and one variable definition on the same line in resources declaration,
              there is no violation.
              The following examples will illustrate difference:
          </p>
          <source>
OutputStream s1 = new PipedOutputStream();
OutputStream s2 = new PipedOutputStream();
// only one statement(variable definition) with two variable references
try (s1; s2; OutputStream s3 = new PipedOutputStream();) // OK
{}
// two statements with variable definitions
try (Reader r = new PipedReader(); s2; Reader s3 = new PipedReader() // violation
) {}
         </source>
      </subsection>

      <subsection name="Example of Usage" id="OneStatementPerLine_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+OneStatementPerLine">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+OneStatementPerLine">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="OneStatementPerLine_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22multiple.statements.line%22">
            multiple.statements.line</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="OneStatementPerLine_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="OneStatementPerLine_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="OverloadMethodsDeclarationOrder">
      <p>Since Checkstyle 5.8</p>
      <subsection name="Description" id="OverloadMethodsDeclarationOrder_Description">
        <p>
          Checks that overload methods are grouped together.
        </p>
      </subsection>

      <subsection name="Examples" id="OverloadMethodsDeclarationOrder_Examples">
        <p>
          Example of incorrect grouping overload methods:
        </p>
        <source>
public void foo(int i) {}
public void foo(String s) {}
public void notFoo() {} // Have to be after foo(int i, String s)
public void foo(int i, String s) {}
        </source>
        <p>
          An example of how to configure the check is:
        </p>
        <source>
&lt;module name="OverloadMethodsDeclarationOrder"/&gt;
        </source>
        </subsection>

      <subsection name="Example of Usage" id="OverloadMethodsDeclarationOrder_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+OverloadMethodsDeclarationOrder">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+OverloadMethodsDeclarationOrder">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="OverloadMethodsDeclarationOrder_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22overload.methods.declaration%22">
            overload.methods.declaration</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="OverloadMethodsDeclarationOrder_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="OverloadMethodsDeclarationOrder_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="PackageDeclaration">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="PackageDeclaration_Description">
        <p>
          Ensures that a class has a package declaration, and (optionally) whether
          the package name matches the directory name for the source file.
        </p>
        <p>
          Rationale: Classes that live in the null package cannot be
          imported. Many novice developers are not aware of this.
        </p>
        <p>
          Packages provide logical namespace to classes and should be stored in
          the form of directory levels to provide physical grouping to your classes.
          These directories are added to the classpath so that your classes
          are visible to JVM when it runs the code.
        </p>
      </subsection>

      <subsection name="Properties" id="PackageDeclaration_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>matchDirectoryStructure</td>
              <td>Control whether to check for directory and package name match.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>7.6.1</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="PackageDeclaration_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;PackageDeclaration&quot;/&gt;
        </source>
        <p>
          Let us consider the class AnnotationLocationCheck which is in the directory
          /com/puppycrawl/tools/checkstyle/checks/annotations/
        </p>
        <source>
package com.puppycrawl.tools.checkstyle.checks; //Violation
public class AnnotationLocationCheck extends AbstractCheck {
  //...
}
        </source>
        <p>
          Example of how the check works when matchDirectoryStructure option is set to false.
          Let us again consider the AnnotationLocationCheck class located at directory
          /com/puppycrawl/tools/checkstyle/checks/annotations/ along with the following setup,
        </p>
        <source>
&lt;module name=&quot;PackageDeclaration&quot;&gt;
&lt;property name=&quot;matchDirectoryStructure&quot; value=&quot;false&quot;/&gt;
&lt;/module&gt;
        </source>
        <source>
package com.puppycrawl.tools.checkstyle.checks;  //No Violation

public class AnnotationLocationCheck extends AbstractCheck {
  //...
}
        </source>
      </subsection>

      <subsection name="Example of Usage" id="PackageDeclaration_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+PackageDeclaration">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="PackageDeclaration_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22mismatch.package.directory%22">
            mismatch.package.directory</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22missing.package.declaration%22">
            missing.package.declaration</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="PackageDeclaration_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="PackageDeclaration_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="ParameterAssignment">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="ParameterAssignment_Description">
        <p> Disallows assignment of parameters.</p>
        <p>
          Rationale: Parameter assignment is often considered poor programming
          practice. Forcing developers to declare parameters as final is often
          onerous. Having a check ensure that parameters are never assigned
          would give the best of both worlds.
        </p>
      </subsection>

      <subsection name="Examples" id="ParameterAssignment_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;ParameterAssignment&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="ParameterAssignment_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ParameterAssignment">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="ParameterAssignment_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22parameter.assignment%22">
            parameter.assignment</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="ParameterAssignment_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="ParameterAssignment_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="RequireThis">
      <p>Since Checkstyle 3.4</p>
      <subsection name="Description" id="RequireThis_Description">
        <p>
          Checks that references to instance variables and methods of the present
          object are explicitly of the form &quot;this.varName&quot; or
          &quot;this.methodName(args)&quot; and that those references don't
          rely on the default behavior when &quot;this.&quot; is absent.
        </p>

        <p>
           Warning: the Check is very controversial if 'validateOnlyOverlapping' option is set to
           'false' and not that actual nowadays.
        </p>

        <p>
          Rationale:
        </p>
        <ol>
          <li>
            The same notation/habit for C++ and Java (C++ have global methods, so having
            &quot;this.&quot; do make sense in it to distinguish call of method of class
            instead of global).
          </li>
          <li>
            Non-IDE development (ease of refactoring, some clearness to distinguish
            static and non-static methods).
          </li>
        </ol>
      </subsection>
      <subsection name="Notes" id="RequireThis_Notes">
            <p>
              Limitations: Nothing is currently done about static variables
              or catch-blocks.  Static methods invoked on a class name seem to be OK;
              both the class name and the method name have a DOT parent.
              Non-static methods invoked on either this or a variable name seem to be
              OK, likewise.
            </p>
      </subsection>

      <subsection name="Properties" id="RequireThis_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>checkFields</td>
              <td>Control whether to check references to fields.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>3.4</td>
            </tr>
            <tr>
              <td>checkMethods</td>
              <td>Control whether to check references to methods.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>3.4</td>
            </tr>
            <tr>
              <td>validateOnlyOverlapping</td>
              <td>Control whether to check only overlapping by variables or arguments.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>6.17</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="RequireThis_Examples">
        <p>
          To configure the default check:
        </p>
        <source>
&lt;module name=&quot;RequireThis&quot;/&gt;
        </source>

        <p>
          To configure to check the <code>this</code> qualifier for fields only:
        </p>
        <source>
&lt;module name="RequireThis"&gt;
  &lt;property name=&quot;checkMethods&quot; value=&quot;false&quot;/&gt;
&lt;/module&gt;
        </source>

       <p>
         Examples of how the check works if validateOnlyOverlapping option is set to true:
       </p>
       <source>
public static class A {
  private int field1;
  private int field2;

  public A(int field1) {
    // Overlapping by constructor argument.
    field1 = field1; // violation: Reference to instance variable "field1" needs "this".
    field2 = 0;
  }

  void foo3() {
    String field1 = "values";
    // Overlapping by local variable.
    field1 = field1; // violation:  Reference to instance variable "field1" needs "this".
  }
}

public static class B {
  private int field;

  public A(int f) {
    field = f;
  }

  String addSuffixToField(String field) {
    // Overlapping by method argument. Equal to "return field = field + "suffix";"
    return field += "suffix"; // violation: Reference to instance variable "field" needs "this".
  }
}
       </source>
       <p>
         Please, be aware of the following logic, which is implemented in the check:
       </p>
       <p>
         1) If you arrange 'this' in your code on your own, the check will not raise violation for
            variables which use 'this' to reference a class field, for example:
       </p>
       <source>
public class C {
  private int scale;
  private int x;
  public void foo(int scale) {
    scale = this.scale; // no violation
    if (scale > 0) {
      scale = -scale; // no violation
    }
    x *= scale;
  }
}
       </source>
       <p>
         2) If method parameter is returned from the method, the check will not raise violation for
            returned variable/parameter, for example:
       </p>
       <source>
public class D {
  private String prefix;
  public String modifyPrefix(String prefix) {
    prefix = "^" + prefix + "$" // no violation (modification of parameter)
    return prefix; // modified method parameter is returned from the method
  }
}
       </source>
       <p>
         Examples of how the check works if validateOnlyOverlapping option is set to false:
       </p>
       <source>
public static class A {
  private int field1;
  private int field2;

  public A(int field1) {
    field1 = field1; // violation: Reference to instance variable "field1" needs "this".
    field2 = 0; // violation: Reference to instance variable "field2" needs "this".
    String field2;
    field2 = "0"; // No violation. Local var allowed
  }

  void foo3() {
    String field1 = "values";
    field1 = field1; // violation:  Reference to instance variable "field1" needs "this".
  }
}

public static class B {
  private int field;

  public A(int f) {
    field = f; // violation:  Reference to instance variable "field" needs "this".
  }

  String addSuffixToField(String field) {
    return field += "suffix"; // violation: Reference to instance variable "field" needs "this".
  }
}

// If the variable is locally defined, there won't be a violation provided the variable
// doesn't overlap.
class C {
  private String s1 = "foo1";
  String s2 = "foo2";

  C() {
    s1 = "bar1"; // Violation. Reference to instance variable 's1' needs "this.".
    String s2;
    s2 = "bar2"; // No violation. Local var allowed.
    s2 += s2; // Violation. Overlapping. Reference to instance variable 's2' needs "this.".
  }
}
       </source>
      </subsection>

      <subsection name="Example of Usage" id="RequireThis_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+RequireThis">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="RequireThis_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22require.this.method%22">
            require.this.method</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22require.this.variable%22">
            require.this.variable</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="RequireThis_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="RequireThis_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="ReturnCount">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="ReturnCount_Description">
        <p>
          Restricts the number of return statements in methods, constructors and lambda expressions.
          Ignores specified methods (<code>equals</code> by default).
        </p>

        <p>
          <b>max</b> property will only check returns in methods and lambdas that return a specific
          value (Ex: 'return 1;').
        </p>

        <p>
          <b>maxForVoid</b> property will only check returns in methods, constructors, and lambdas
          that have no return type (IE 'return;').
          It will only count visible return statements. Return statements not normally written, but
          implied, at the end of the method/constructor definition will not be taken into account.
          To disallow "return;" in void return type methods, use a value of 0.
        </p>

        <p>
          Rationale: Too many return points can mean that code is
          attempting to do too much or may be difficult to understand.
        </p>
      </subsection>

      <subsection name="Properties" id="ReturnCount_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>max</td>
              <td>
                Specify maximum allowed number of return statements in non-void methods/lambdas.
              </td>
              <td><a href="property_types.html#integer">Integer</a></td>
              <td><code>2</code></td>
              <td>3.2</td>
            </tr>
            <tr>
              <td>maxForVoid</td>
              <td>Specify maximum allowed number of return statements in void
                  methods/constructors/lambdas.</td>
              <td><a href="property_types.html#integer">Integer</a></td>
              <td><code>1</code></td>
              <td>6.19</td>
            </tr>
            <tr>
              <td>format</td>
              <td>Specify method names to ignore.</td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>"^equals$"</code></td>
              <td>3.4</td>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>
                subset of tokens
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
                  CTOR_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
                  METHOD_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAMBDA">
                  LAMBDA</a>.
              </td>
              <td>
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
                  CTOR_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
                  METHOD_DEF</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAMBDA">
                  LAMBDA</a>.
              </td>
              <td>3.2</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="ReturnCount_Examples">
        <p>
          To configure the check so that it doesn't allow more than three
          return statements per method (ignoring the <code>equals()</code>
          method):
        </p>
        <source>
&lt;module name=&quot;ReturnCount&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;3&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it doesn't allow any
          return statements per void method:
        </p>
        <source>
&lt;module name=&quot;ReturnCount&quot;&gt;
  &lt;property name=&quot;maxForVoid&quot; value=&quot;0&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it doesn't allow more than 2
          return statements per method (ignoring the <code>equals()</code>
          method) and more than 1 return statements per void method:
        </p>
        <source>
&lt;module name=&quot;ReturnCount&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;2&quot;/&gt;
  &lt;property name=&quot;maxForVoid&quot; value=&quot;1&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it doesn't allow more than three
          return statements per method for all methods:
        </p>
        <source>
&lt;module name=&quot;ReturnCount&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;3&quot;/&gt;
  &lt;property name=&quot;format&quot; value=&quot;^$&quot;/&gt;
&lt;/module&gt;
        </source>

        <p>
          To configure the check so that it doesn't allow any return statements
          in constructors, more than one return statement in all lambda
          expressions and more than two return statements in methods:
        </p>
        <source>
&lt;module name=&quot;ReturnCount&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;0&quot;/&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;CTOR_DEF&quot;/&gt;
&lt;/module&gt;
&lt;module name=&quot;ReturnCount&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;1&quot;/&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;LAMBDA&quot;/&gt;
&lt;/module&gt;
&lt;module name=&quot;ReturnCount&quot;&gt;
  &lt;property name=&quot;max&quot; value=&quot;2&quot;/&gt;
  &lt;property name=&quot;tokens&quot; value=&quot;METHOD_DEF&quot;/&gt;
&lt;/module&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="ReturnCount_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+ReturnCount">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="ReturnCount_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22return.count%22">
            return.count</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22return.countVoid%22">
            return.countVoid</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="ReturnCount_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="ReturnCount_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="SimplifyBooleanExpression">
      <p>Since Checkstyle 3.0</p>
      <subsection name="Description" id="SimplifyBooleanExpression_Description">
        <p>
          Checks for over-complicated boolean expressions. Currently finds
          code like <code> if (b == true)</code>, <code>b || true</code>, <code>!false</code>,
          etc.
        </p>

        <p>
          Rationale: Complex boolean logic makes code hard to understand and
          maintain.
        </p>
      </subsection>

      <subsection name="Examples" id="SimplifyBooleanExpression_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;SimplifyBooleanExpression&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="SimplifyBooleanExpression_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+SimplifyBooleanExpression">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+SimplifyBooleanExpression">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="SimplifyBooleanExpression_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22simplify.expression%22">
            simplify.expression</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="SimplifyBooleanExpression_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="SimplifyBooleanExpression_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="SimplifyBooleanReturn">
      <p>Since Checkstyle 3.0</p>
      <subsection name="Description" id="SimplifyBooleanReturn_Description">
        <p>
          Checks for over-complicated boolean return statements. For example
          the following code
        </p>
        <source>
if (valid())
  return false;
else
  return true;
        </source>

        <p>
          could be written as
        </p>
        <source>
return !valid();
        </source>

        <p>
          The idea for this Check has been shamelessly stolen from the
          equivalent <a href="https://pmd.github.io/">PMD</a> rule.
        </p>
      </subsection>

      <subsection name="Examples" id="SimplifyBooleanReturn_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;SimplifyBooleanReturn&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="SimplifyBooleanReturn_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+SimplifyBooleanReturn">
            Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+SimplifyBooleanReturn">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="SimplifyBooleanReturn_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22simplify.boolReturn%22">
            simplify.boolReturn</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="SimplifyBooleanReturn_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="SimplifyBooleanReturn_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="StringLiteralEquality">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="StringLiteralEquality_Description">
        <p>
          Checks that string literals are not used with <code>==</code> or
          <code>&#33;=</code>.
        </p>

        <p>
          Rationale: Novice Java programmers often use code like:
        </p>
        <source>
if (x == &quot;something&quot;)
        </source>

        <p>when they mean</p>
        <source>
if (&quot;something&quot;.equals(x))
        </source>
      </subsection>

      <subsection name="Examples" id="StringLiteralEquality_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;StringLiteralEquality&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="StringLiteralEquality_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+StringLiteralEquality">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="StringLiteralEquality_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22string.literal.equality%22">
            string.literal.equality</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="StringLiteralEquality_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="StringLiteralEquality_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="SuperClone">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="SuperClone_Description">
        <p>
          Checks that an overriding <code>clone()</code> method invokes
          <code>super.clone()</code>. Does not check native methods, as
          they have no possible java defined implementation.
        </p>

        <p>
          Reference: <a
          href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone%28%29">
          Object.clone()</a>.
        </p>
      </subsection>

      <subsection name="Examples" id="SuperClone_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;SuperClone&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="SuperClone_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+SuperClone">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="SuperClone_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22missing.super.call%22">
            missing.super.call</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="SuperClone_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="SuperClone_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="SuperFinalize">
      <p>Since Checkstyle 3.2</p>
      <subsection name="Description" id="SuperFinalize_Description">
        <p>
          Checks that an overriding <code>finalize()</code> method invokes
          <code>super.finalize()</code>. Does not check native methods, as
          they have no possible java defined implementation.
        </p>

        <p>
          References:
          <a href="https://www.oracle.com/technical-resources/articles/javase/finalization.html">
          How to Handle Java Finalization's Memory-Retention Issues</a>;
          <a href="https://javarevisited.blogspot.com/2012/03/finalize-method-in-java-tutorial.html">
          10 points on finalize method in Java</a>.
        </p>
      </subsection>

      <subsection name="Examples" id="SuperFinalize_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;SuperFinalize&quot;/&gt;
        </source>
      </subsection>

      <subsection name="Example of Usage" id="SuperFinalize_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+SuperFinalize">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="SuperFinalize_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22missing.super.call%22">
            missing.super.call</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="SuperFinalize_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="SuperFinalize_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="UnnecessaryParentheses">
      <p>Since Checkstyle 3.4</p>
      <subsection name="Description" id="UnnecessaryParentheses_Description">
        <p>
          Checks if unnecessary parentheses are used in a statement or expression.
          The check will flag the following with warnings:
        </p>
        <source>
    return (x);          // parens around identifier
    return (x + 1);      // parens around return value
    int x = (y / 2 + 1); // parens around assignment rhs
    for (int i = (0); i &lt; 10; i++) {  // parens around literal
    t -= (z + 1);        // parens around assignment rhs
        </source>
      </subsection>

      <subsection name="Notes" id="UnnecessaryParentheses_Notes">
        <p>
          The check is not "type aware", that is to say, it can't tell if parentheses
          are unnecessary based on the types in an expression.  It also doesn't know about
          operator precedence and associativity; therefore it won't catch something like
        </p>
        <source>
            int x = (a + b) + c;
        </source>
        <p>
          In the above case, given that <em>a</em>,<em>b</em>, and <em>c</em> are all
          <code>int</code> variables, the parentheses around <code>a + b</code> are not needed.
        </p>
      </subsection>

      <subsection name="Properties" id="UnnecessaryParentheses_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>
                subset of tokens
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EXPR">
                  EXPR</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IDENT">
                  IDENT</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_DOUBLE">
                  NUM_DOUBLE</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_FLOAT">
                  NUM_FLOAT</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_INT">
                  NUM_INT</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_LONG">
                  NUM_LONG</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STRING_LITERAL">
                  STRING_LITERAL</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_NULL">
                  LITERAL_NULL</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FALSE">
                  LITERAL_FALSE</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRUE">
                  LITERAL_TRUE</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">
                  ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND_ASSIGN">
                  BAND_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR_ASSIGN">
                  BOR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR_ASSIGN">
                  BSR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR_ASSIGN">
                  BXOR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV_ASSIGN">
                  DIV_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS_ASSIGN">
                  MINUS_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD_ASSIGN">
                  MOD_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS_ASSIGN">
                  PLUS_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL_ASSIGN">
                  SL_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR_ASSIGN">
                  SR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR_ASSIGN">
                  STAR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAMBDA">
                  LAMBDA</a>.
              </td>
              <td>
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#EXPR">
                  EXPR</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IDENT">
                  IDENT</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_DOUBLE">
                  NUM_DOUBLE</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_FLOAT">
                  NUM_FLOAT</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_INT">
                  NUM_INT</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#NUM_LONG">
                  NUM_LONG</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STRING_LITERAL">
                  STRING_LITERAL</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_NULL">
                  LITERAL_NULL</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_FALSE">
                  LITERAL_FALSE</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRUE">
                  LITERAL_TRUE</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ASSIGN">
                  ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BAND_ASSIGN">
                  BAND_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BOR_ASSIGN">
                  BOR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BSR_ASSIGN">
                  BSR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#BXOR_ASSIGN">
                  BXOR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#DIV_ASSIGN">
                  DIV_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MINUS_ASSIGN">
                  MINUS_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#MOD_ASSIGN">
                  MOD_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PLUS_ASSIGN">
                  PLUS_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SL_ASSIGN">
                  SL_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#SR_ASSIGN">
                  SR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STAR_ASSIGN">
                  STAR_ASSIGN</a>,
                <a href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LAMBDA">
                  LAMBDA</a>.
              </td>
              <td>3.4</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="UnnecessaryParentheses_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;UnnecessaryParentheses&quot;/&gt;
        </source>
        <p>
          Which results in the following violations:
        </p>
        <source>
public int square(int a, int b){
  int square = (a * b); //violation
  return (square); //violation
}
int sumOfSquares = 0;
for(int i=(0); i&lt;10; i++){ //violation
  int x = (i + 1); //violation
  sumOfSquares += (square(x * x)); //violation
}
double num = (10.0); //violation
List&lt;String&gt; list = Arrays.asList(&quot;a1&quot;, &quot;b1&quot;, &quot;c1&quot;);
myList.stream()
  .filter((s) -&gt; s.startsWith(&quot;c&quot;)) //violation
  .forEach(System.out::println);
        </source>
      </subsection>

      <subsection name="Example of Usage" id="UnnecessaryParentheses_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+UnnecessaryParentheses">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages" id="UnnecessaryParentheses_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.paren.assign%22">
            unnecessary.paren.assign</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.paren.expr%22">
            unnecessary.paren.expr</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.paren.ident%22">
            unnecessary.paren.ident</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.paren.lambda%22">
            unnecessary.paren.lambda</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.paren.literal%22">
            unnecessary.paren.literal</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.paren.return%22">
            unnecessary.paren.return</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.paren.string%22">
            unnecessary.paren.string</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="UnnecessaryParentheses_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="UnnecessaryParentheses_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="UnnecessarySemicolonAfterTypeMemberDeclaration">
      <p>Since Checkstyle 8.24</p>
      <subsection name="Description"
                  id="UnnecessarySemicolonAfterTypeMemberDeclaration_Description">
        <p>
          Checks if unnecessary semicolon is used after type member declaration.
        </p>
      </subsection>
      <subsection name="Notes" id="UnnecessarySemicolonAfterTypeMemberDeclaration_Notes">
        <p>
          This check is not applicable to empty statements (unnecessary semicolons inside
          methods or init blocks),
          <a href="https://checkstyle.org/config_coding.html#EmptyStatement">EmptyStatement</a>
          is responsible for it.
        </p>
      </subsection>
      <subsection name="Properties" id="UnnecessarySemicolonAfterTypeMemberDeclaration_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>tokens</td>
              <td>tokens to check</td>
              <td>
                subset of tokens
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
                 CLASS_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
                INTERFACE_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">
                ENUM_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">
                ANNOTATION_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                VARIABLE_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
                ANNOTATION_FIELD_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STATIC_INIT">
                STATIC_INIT</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">
                INSTANCE_INIT</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
                CTOR_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
                METHOD_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">
                ENUM_CONSTANT_DEF</a>.
              </td>
              <td>
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
                    CLASS_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
                    INTERFACE_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">
                    ENUM_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">
                    ANNOTATION_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
                    VARIABLE_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
                    ANNOTATION_FIELD_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STATIC_INIT">
                    STATIC_INIT</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">
                    INSTANCE_INIT</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
                    CTOR_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
                    METHOD_DEF</a>,
                <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">
                    ENUM_CONSTANT_DEF</a>.
              </td>
              <td>8.24</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="UnnecessarySemicolonAfterTypeMemberDeclaration_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;UnnecessarySemicolonAfterTypeMemberDeclaration&quot;/&gt;
        </source>
        <p>
          Results in following:
        </p>
        <source>
class A {
    ; // violation, standalone semicolon
    {}; // violation, extra semicolon after init block
    static {}; // violation, extra semicolon after static init block
    A(){}; // violation, extra semicolon after constructor definition
    void method() {}; // violation, extra semicolon after method definition
    int field = 10;; // violation, extra semicolon after field declaration

    {
        ; // no violation, it is empty statement inside init block
    }

    static {
        ; // no violation, it is empty statement inside static init block
    }

    void anotherMethod() {
        ; // no violation, it is empty statement
        if(true); // no violation, it is empty statement
    }
}
        </source>
      </subsection>

      <subsection name="Example of Usage"
                  id="UnnecessarySemicolonAfterTypeMemberDeclaration_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+UnnecessarySemicolonAfterTypeMemberDeclaration">
              Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages"
                  id="UnnecessarySemicolonAfterTypeMemberDeclaration_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.semicolon%22">
                unnecessary.semicolon</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="UnnecessarySemicolonAfterTypeMemberDeclaration_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module"
                  id="UnnecessarySemicolonAfterTypeMemberDeclaration_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="UnnecessarySemicolonInEnumeration">
      <p>Since Checkstyle 8.22</p>
      <subsection name="Description" id="UnnecessarySemicolonInEnumeration_Description">
        <p>
            Checks if unnecessary semicolon is in enum definitions.
            Semicolon is not needed if enum body contains only enum constants.
        </p>
      </subsection>

      <subsection name="Examples" id="UnnecessarySemicolonInEnumeration_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;UnnecessarySemicolonInEnumeration&quot;/&gt;
        </source>
        <p>
          Example of violations
        </p>
        <source>
enum One {
    A,B; // violation
}
enum Two {
    A,B,; // violation
}
enum Three {
    A,B(); // violation
}
enum Four {
    A,B{}; // violation
}
enum Five {
    A,
    B
    ; // violation
}
        </source>
        <p>
          Example of good cases
        </p>
        <source>
enum Normal {
    A,
    B,
    ; // required ";", no violation
    Normal(){}
}
enum NoSemicolon {
    A, B // only enum constants, no semicolon required
}
        </source>
      </subsection>

      <subsection name="Example of Usage"
                  id="UnnecessarySemicolonInEnumeration_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+UnnecessarySemicolonInEnumeration">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages"
                  id="UnnecessarySemicolonInEnumeration_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.semicolon%22">
            unnecessary.semicolon</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="UnnecessarySemicolonInEnumeration_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="UnnecessarySemicolonInEnumeration_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="UnnecessarySemicolonInTryWithResources">
      <p>Since Checkstyle 8.22</p>
      <subsection name="Description" id="UnnecessarySemicolonInTryWithResources_Description">
        <p>
          Checks if unnecessary semicolon is used in last resource declaration.
        </p>
      </subsection>

      <subsection name="Properties" id="UnnecessarySemicolonInTryWithResources_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>

            <tr>
              <td>allowWhenNoBraceAfterSemicolon</td>
              <td>Allow unnecessary semicolon if closing paren is not on the same line.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>8.22</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="UnnecessarySemicolonInTryWithResources_Examples">
        <p>
          To configure the check:
        </p>
        <source>
&lt;module name=&quot;UnnecessarySemicolonInTryWithResources&quot;/&gt;
        </source>
        <p>
          Example of violations
        </p>
        <source>
class A {
    void method() throws IOException {
        try(Reader r1 = new PipedReader();){} // violation
        try(Reader r4 = new PipedReader();Reader r5 = new PipedReader()
        ;){} // violation
        try(Reader r6 = new PipedReader();
            Reader r7
                   = new PipedReader();
        ){}
    }
}
        </source>
        <p>
          To configure the check to detect unnecessary semicolon
          if closing paren is not on same line
        </p>
        <source>
&lt;module name="UnnecessarySemicolonInTryWithResources"&gt;
  &lt;property name="allowWhenNoBraceAfterSemicolon" value="false"/&gt;
&lt;/module&gt;
        </source>
        <p>
          Example of exclusion
        </p>
        <source>
class A {
    void method() throws IOException {
        try(Reader r1 = new PipedReader();){} // violation
        try(Reader r6 = new PipedReader();
            Reader r7 = new PipedReader(); // violation
        ){}
    }
}
        </source>
      </subsection>

      <subsection name="Example of Usage"
                  id="UnnecessarySemicolonInTryWithResources_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+UnnecessarySemicolonInTryWithResources">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages"
                  id="UnnecessarySemicolonInTryWithResources_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22unnecessary.semicolon%22">
            unnecessary.semicolon</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="UnnecessarySemicolonInTryWithResources_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="UnnecessarySemicolonInTryWithResources_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

    <section name="VariableDeclarationUsageDistance">
      <p>Since Checkstyle 5.8</p>
      <subsection name="Description" id="VariableDeclarationUsageDistance_Description">
        <p>
          Checks the distance between declaration of variable and its first usage.
        </p>
      </subsection>

      <subsection name="Properties" id="VariableDeclarationUsageDistance_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>

            <tr>
              <td>allowedDistance</td>
              <td>Specify distance between declaration of variable and its first usage.
                  Values should be greater than 0.</td>
              <td><a href="property_types.html#integer">Integer</a></td>
              <td><code>3</code></td>
              <td>5.8</td>
            </tr>

            <tr>
              <td>ignoreVariablePattern</td>
              <td>
                Define RegExp to ignore distance calculation for variables listed in this pattern.
              </td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>""</code></td>
              <td>5.8</td>
            </tr>

            <tr>
              <td>validateBetweenScopes</td>
              <td>Allow to calculate the distance between declaration of variable and its
                  first usage in the different scopes.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>false</code></td>
              <td>5.8</td>
            </tr>

            <tr>
              <td>ignoreFinal</td>
              <td>Allow to ignore variables with a 'final' modifier.</td>
              <td><a href="property_types.html#boolean">Boolean</a></td>
              <td><code>true</code></td>
              <td>5.8</td>
            </tr>
          </table>
        </div>
      </subsection>

      <subsection name="Examples" id="VariableDeclarationUsageDistance_Examples">
        <p>
          Example #1:
        </p>
        <source>
int count;
a = a + b;
b = a + a;
count = b; // DECLARATION OF VARIABLE 'count'
           // SHOULD BE HERE (distance = 3)
        </source>
        <p>
          Example #2:
        </p>
        <source>
int count;
{
  a = a + b;
  count = b; // DECLARATION OF VARIABLE 'count'
             // SHOULD BE HERE (distance = 2)
}
        </source>
        <p>
          Check can detect a block of initialization methods. If a variable is used in
          such a block and there is no other statements after this variable then distance=1.
        </p>
        <p>
          Case #1:
        </p>
        <source>
int minutes = 5;
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(timeNow);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
cal.set(Calendar.HOUR_OF_DAY, hh);
cal.set(Calendar.MINUTE, minutes);
        </source>
        <p>
          The distance for the variable minutes is 1 even
          though this variable is used in the fifth method's call.
        </p>
        <p>
          Case #2:
        </p>
        <source>
int minutes = 5;
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(timeNow);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
System.out.println(cal);
cal.set(Calendar.HOUR_OF_DAY, hh);
cal.set(Calendar.MINUTE, minutes);
         </source>
         <p>
           The distance for the variable minutes is 6 because there is one more expression
           (except the initialization block) between the declaration of this variable and its usage.
         </p>
         <p>
           An example how to configure this Check:
         </p>
         <source>
&lt;module name="VariableDeclarationUsageDistance"/&gt;
         </source>
         <p>
           An example of how to configure this Check:
            - to set the allowed distance to 4;
            - to ignore variables with prefix '^temp';
            - to force the validation between scopes;
            - to check the final variables;
         </p>
         <source>
&lt;module name="VariableDeclarationUsageDistance"&gt;
  &lt;property name="allowedDistance" value="4"/&gt;
  &lt;property name="ignoreVariablePattern" value="^temp.*"/&gt;
  &lt;property name="validateBetweenScopes" value="true"/&gt;
  &lt;property name="ignoreFinal" value="false"/&gt;
&lt;/module&gt;
         </source>
      </subsection>
      <subsection name="Notes" id="VariableDeclarationUsageDistance_Notes">
        <p>
          ATTENTION!! (Not supported cases)
        </p>
        <source>
Case #1:
{
  int c;
  int a = 3;
  int b = 2;
    {
      a = a + b;
      c = b;
    }
}
        </source>
        <p>
          Distance for variable 'a' = 1;
          Distance for variable 'b' = 1;
          Distance for variable 'c' = 2.
         </p>
         <p>
           As distance by default is 1 the Check doesn't raise warning for
           variables 'a' and 'b' to move them into the block.
         </p>
         <p>
           Case #2:
         </p>
         <source>
int sum = 0;
for (int i = 0; i &lt; 20; i++) {
  a++;
  b--;
  sum++;
  if (sum > 10) {
    res = true;
  }
}
         </source>
         <p>
           Distance for variable 'sum' = 3.
         </p>
         <p>
           As the distance is more than the default one, the Check
           raises warning for variable 'sum' to move it into the 'for(...)' block.
           But there is situation when variable 'sum' hasn't to be 0 within each iteration.
           So, to avoid such warnings you can use Suppression Filter, provided by
           Checkstyle, for the whole class.
         </p>
      </subsection>

      <subsection name="Example of Usage" id="VariableDeclarationUsageDistance_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+VariableDeclarationUsageDistance">
            Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+VariableDeclarationUsageDistance">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>

      <subsection name="Violation Messages"
                  id="VariableDeclarationUsageDistance_Violation_Messages">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22variable.declaration.usage.distance%22">
            variable.declaration.usage.distance</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%2Fcom%2Fpuppycrawl%2Ftools%2Fcheckstyle%2Fchecks%2Fcoding+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22variable.declaration.usage.distance.extend%22">
            variable.declaration.usage.distance.extend</a>
          </li>
        </ul>
        <p>
          All messages can be customized if the default message doesn't suit you.
          Please <a href="config.html#Custom_messages">see the documentation</a> to learn how to.
        </p>
      </subsection>

      <subsection name="Package" id="VariableDeclarationUsageDistance_Package">
        <p>
          com.puppycrawl.tools.checkstyle.checks.coding
        </p>
      </subsection>

      <subsection name="Parent Module" id="VariableDeclarationUsageDistance_Parent_Module">
        <p>
          <a href="config.html#TreeWalker">TreeWalker</a>
        </p>
      </subsection>
    </section>

  </body>
</document>
