EitherLogOfThrow: add support for java.util.logging.Logger

This commit is contained in:
Paul Campbell 2016-09-05 17:56:58 +01:00
parent ee52569e22
commit 4800ef85d0
2 changed files with 5 additions and 1 deletions

View file

@ -2255,7 +2255,7 @@ Map<Long, String> idTable = new HashMap<Long, String>();
Checks that when an exception is caught, that if it is logged then it is not also re-thrown. Log or throw; one or the other or neither, but not both.
> TODO: loggingMethodNames: add 'log'
Accepts `java.util.logging.Logger` and `org.slf4j.Logger`.
#### [EnumValueName](http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/com/github/sevntu/checkstyle/checks/naming/EnumValueNameCheck.html)

View file

@ -219,6 +219,10 @@
<module name="ConfusingConditionCheck"/> <!-- prevents negation within an "if" expression if "else" is present -->
<module name="DiamondOperatorForVariableDefinitionCheck"/> <!-- use the diamond operator -->
<module name="EitherLogOrThrowCheck"/> <!-- log or throw an exception - don't do both -->
<module name="EitherLogOrThrowCheck"> <!-- log or throw an exception - don't do both -->
<property name="loggerFullyQualifiedClassName" value="java.util.logging.Logger"/>
<property name="loggingMethodNames" value="log, severe, warning, info, config, fine, finer, finest, "/>
</module>
<module name="ForbidCCommentsInMethodsCheck"/> <!-- prevent /* C-style */ comments inside methods -->
<module name="ForbidReturnInFinallyBlockCheck"/> <!-- returns in finally override returns elsewhere in method -->
<module name="ForbidThrowAnonymousExceptionsCheck"/> <!-- only throw concrete exceptions -->