Issue #540 Unable to instantiate RedundantThrows when run checkstyle with "-c sun_checks.xml" parameter
This commit is contained in:
parent
859ab6ba4b
commit
0343b58a76
|
|
@ -498,16 +498,6 @@
|
|||
<!-- See http://checkstyle.sf.net/config_coding.html !-->
|
||||
<module name="ParameterAssignment"/>
|
||||
|
||||
<!-- Checks for redundant exceptions declared in throws clause such as duplicates, !-->
|
||||
<!-- unchecked exceptions or subclasses of another declared exception. !-->
|
||||
<!-- See http://checkstyle.sf.net/config_coding.html !-->
|
||||
<module name="RedundantThrows">
|
||||
<property name="allowUnchecked" value="false"/>
|
||||
<property name="allowSubclasses" value="false"/>
|
||||
<property name="logLoadErrors" value="true"/>
|
||||
<property name="suppressLoadErrors" value="false"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks that code doesn't rely on the "this." default. !-->
|
||||
<!-- See http://checkstyle.sf.net/config_coding.html !-->
|
||||
<module name="RequireThis">
|
||||
|
|
|
|||
|
|
@ -465,14 +465,6 @@
|
|||
<module name="MissingSwitchDefault">
|
||||
</module>
|
||||
|
||||
<!-- See http://checkstyle.sf.net/config_coding.html -->
|
||||
<!-- Checks for redundant exceptions declared in throws clause such
|
||||
as duplicates, unchecked exceptions or subclasses of another declared exception. -->
|
||||
<!-- <property name="allowUnchecked" value="false"/> -->
|
||||
<!-- <property name="allowSubclasses" value="false"/> -->
|
||||
<module name="RedundantThrows">
|
||||
</module>
|
||||
|
||||
<!-- See http://checkstyle.sf.net/config_coding.html -->
|
||||
<!-- Checks for overly complicated boolean expressions. -->
|
||||
<module name="SimplifyBooleanExpression">
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@
|
|||
<module name="InnerAssignment"/>
|
||||
<module name="MagicNumber"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="RedundantThrows"/>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -586,12 +586,6 @@
|
|||
<td><a href="config_modifier.html#RedundantModifier">RedundantModifier</a></td>
|
||||
<td>Checks for redundant modifiers in interface and annotation definitions.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="config_coding.html#RedundantThrows">RedundantThrows</a></td>
|
||||
<td>Checks for redundant exceptions declared in throws clause
|
||||
such as duplicates, unchecked exceptions or subclasses of
|
||||
another declared exception.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="config_misc.html#Regexp">Regexp</a></td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -975,105 +975,6 @@ for (int i = 0; i < 1; i++) {
|
|||
</subsection>
|
||||
</section>
|
||||
|
||||
<section name="RedundantThrows">
|
||||
<subsection name="Description">
|
||||
<p>
|
||||
Checks for redundant exceptions declared in a <code>throws</code> clause such as
|
||||
duplicates, unchecked exceptions or subclasses of another declared
|
||||
exception.
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Properties">
|
||||
<table>
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th>description</th>
|
||||
<th>type</th>
|
||||
<th>default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>allowUnchecked</td>
|
||||
<td>whether unchecked exceptions in throws are allowed or not</td>
|
||||
<td><a href="property_types.html#boolean">boolean</a></td>
|
||||
<td><code>false</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>allowSubclasses</td>
|
||||
<td> whether subclasses of another declared exception
|
||||
are allowed in throws clause </td>
|
||||
<td><a href="property_types.html#boolean">boolean</a></td>
|
||||
<td><code>false</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>logLoadErrors</td>
|
||||
<td>This check may need to load exception classes mentioned in
|
||||
the @throws tag to check whether they are RuntimeExceptions.
|
||||
If loading the class fails, this property allows controlling
|
||||
Checkstyle's error handling. If set to <code>false</code> a
|
||||
classpath configuration problem is assumed and the TreeWalker
|
||||
stops operating on the class completely.
|
||||
If set to <code>true</code> (the default), Checkstyle assumes a
|
||||
typo or refactoring problem in the
|
||||
javadoc and logs the problem in the normal Checkstyle report
|
||||
(potentially masking a configuration error).</td>
|
||||
<td><a href="property_types.html#boolean">boolean</a></td>
|
||||
<td><code>true</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>suppressLoadErrors</td>
|
||||
<td>When logLoadErrors is set to true, the TreeWalker completely
|
||||
processes a class and displays any problems with loading exceptions
|
||||
as Checkstyle violations.
|
||||
When this property is set to true, the violations generated when
|
||||
logLoadErrors is true are suppressed from being reported as
|
||||
violations in the Checkstyle report.
|
||||
</td>
|
||||
<td><a href="property_types.html#boolean">boolean</a></td>
|
||||
<td><code>false</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Examples">
|
||||
<p>
|
||||
To configure the default check:
|
||||
</p>
|
||||
<source>
|
||||
<module name="RedundantThrows"/>
|
||||
</source>
|
||||
|
||||
<p>
|
||||
To configure the check to allow unchecked exception in throws clause
|
||||
</p>
|
||||
<source>
|
||||
<module name="RedundantThrows">
|
||||
<property name="allowUnchecked" value="true"/>
|
||||
</module>
|
||||
</source>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Note">
|
||||
<p>
|
||||
The classpath should be configured to locate the class
|
||||
information. The classpath configuration is dependent on the
|
||||
mechanism used to invoke Checkstyle.
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Package">
|
||||
<p>
|
||||
com.puppycrawl.tools.checkstyle.checks.coding
|
||||
</p>
|
||||
</subsection>
|
||||
|
||||
<subsection name="Parent Module">
|
||||
<p>
|
||||
<a href="config.html#TreeWalker">TreeWalker</a>
|
||||
</p>
|
||||
</subsection>
|
||||
</section>
|
||||
|
||||
<section name="SimplifyBooleanExpression">
|
||||
<subsection name="Description">
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Reference in New Issue