Rename RuleSetLoadException

This commit is contained in:
Andreas Dangel
2020-12-11 18:35:41 +01:00
parent 0244ebf6e3
commit bcbf588bba
4 changed files with 11 additions and 11 deletions

View File

@ -15,17 +15,17 @@ import net.sourceforge.pmd.annotation.InternalApi;
* <p>In the new {@link RuleSetLoader} API, this is thrown instead of
* {@link RuleSetNotFoundException}.
*/
public final class RulesetLoadException extends RuntimeException {
public final class RuleSetLoadException extends RuntimeException {
/** Constructors are internal. */
@InternalApi
public RulesetLoadException(String message, Throwable cause) {
public RuleSetLoadException(String message, Throwable cause) {
super(message, cause);
}
/** Constructors are internal. */
@InternalApi
public RulesetLoadException(String message) {
public RuleSetLoadException(String message) {
super(message);
}

View File

@ -126,7 +126,7 @@ public final class RuleSetLoader {
*
* @param rulesetPath A reference to a single ruleset
*
* @throws RulesetLoadException If any error occurs (eg, invalid syntax, or resource not found)
* @throws RuleSetLoadException If any error occurs (eg, invalid syntax, or resource not found)
*/
public RuleSet loadFromResource(String rulesetPath) {
return loadFromResource(new RuleSetReferenceId(rulesetPath));
@ -137,7 +137,7 @@ public final class RuleSetLoader {
*
* @param paths Paths
*
* @throws RulesetLoadException If any error occurs (eg, invalid syntax, or resource not found),
* @throws RuleSetLoadException If any error occurs (eg, invalid syntax, or resource not found),
* for any of the parameters
* @throws NullPointerException If the parameter, or any component is null
*/
@ -155,7 +155,7 @@ public final class RuleSetLoader {
* @param first First path
* @param rest Paths
*
* @throws RulesetLoadException If any error occurs (eg, invalid syntax, or resource not found),
* @throws RuleSetLoadException If any error occurs (eg, invalid syntax, or resource not found),
* for any of the parameters
* @throws NullPointerException If the parameter, or any component is null
*/
@ -168,7 +168,7 @@ public final class RuleSetLoader {
try {
return toFactory().createRuleSet(ruleSetReferenceId);
} catch (Exception e) {
throw new RulesetLoadException("Cannot parse " + ruleSetReferenceId, e);
throw new RuleSetLoadException("Cannot parse " + ruleSetReferenceId, e);
}
}
@ -190,7 +190,7 @@ public final class RuleSetLoader {
*
* @return A list of all category rulesets
*
* @throws RulesetLoadException If a standard ruleset cannot be loaded.
* @throws RuleSetLoadException If a standard ruleset cannot be loaded.
* This is a corner case, that probably should not be caught by clients.
* The standard rulesets are well-formed, at least in stock PMD distributions.
*

View File

@ -6,7 +6,7 @@ package net.sourceforge.pmd;
/**
* @deprecated This is now only thrown by deprecated apis. {@link RuleSetLoader}
* throws {@link RulesetLoadException} instead
* throws {@link RuleSetLoadException} instead
*/
@Deprecated
public class RuleSetNotFoundException extends Exception {

View File

@ -36,8 +36,8 @@ import org.apache.commons.text.StringEscapeUtils;
import net.sourceforge.pmd.Rule;
import net.sourceforge.pmd.RuleSet;
import net.sourceforge.pmd.RuleSetLoadException;
import net.sourceforge.pmd.RuleSetLoader;
import net.sourceforge.pmd.RulesetLoadException;
import net.sourceforge.pmd.lang.Language;
import net.sourceforge.pmd.lang.rule.RuleReference;
import net.sourceforge.pmd.lang.rule.XPathRule;
@ -122,7 +122,7 @@ public class RuleDocGenerator {
} else {
LOG.fine("Ignoring ruleset " + filename);
}
} catch (RulesetLoadException e) {
} catch (RuleSetLoadException e) {
// ignore rulesets, we can't read
LOG.log(Level.WARNING, "ruleset file " + filename + " ignored (" + e.getMessage() + ")", e);
}