このチェックを checkstyle チェック ファイルから削除したいと考えています。どのモジュールが実際にこのエラーを発生させる責任があるので、これを無視するようにマークできます。さらに、checkstyle バージョンを 2.12.1 に変更し、ソースとターゲットを javav バージョンに 1.8 として追加しましたが、それでもラムダで EOF 例外がスローされます。エラー-
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.12.1</version>
<executions>
<execution>
<id>checkstyle</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
<failOnViolation>true</failOnViolation>
<configLocation>src/main/resources/checkstyle_checks.xml</configLocation>
<outputFile>build/checkstyle-results/checkstyle_results.xml</outputFile>
</configuration>
</execution>
</executions>
</plugin>
Checkstyle_checks.xml
<module name="Checker">
<module name="FileLength">
<property name="severity" value="error" />
<property name="max" value="500" />
</module>
<module name="FileTabCharacter">
<property name="severity" value="info" />
<property name="eachLine" value="false" />
</module>
<!-- Checks for long anonymous inner classes. -->
<!-- Sukhmeet starts -->
<module name="TreeWalker">
<module name="AnonInnerLength">
<property name="severity" value="error" />
<property name="max" value="20" />
</module>
<module name="ArrayTypeStyle">
<property name="severity" value="warning" />
<property name="javaStyle" value="true" />
</module>
<module name="AvoidNestedBlocks">
<property name="severity" value="error" />
<property name="allowInSwitchCase" value="false" />
</module>
<module name="AvoidStarImport">
<property name="severity" value="warning" />
<property name="allowClassImports" value="false" />
<property name="allowStaticMemberImports" value="false" />
</module>
<module name="ClassFanOutComplexity">
<property name="severity" value="error" />
<property name="max" value="20" />
</module>
<module name="ClassTypeParameterName">
<property name="severity" value="error" />
<property name="format" value="^[A-Z]$" />
</module>
<!-- Comment pattern matcher Not found -->
<module name="ConstantName">
<property name="severity" value="warning" />
<property name="applyToPackage" value="true" />
<property name="applyToPrivate" value="true" />
<property name="applyToProtected" value="true" />
<property name="applyToPublic" value="true" />
<property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$" />
</module>
<module name="CyclomaticComplexity">
<property name="severity" value="error" />
<property name="max" value="7" />
</module>
<module name="DeclarationOrder">
<property name="severity" value="info" />
<property name="ignoreConstructors" value="false" />
<property name="ignoreMethods" value="false" />
<property name="ignoreModifiers" value="false" />
</module>
<module name="DefaultComesLast">
<property name="severity" value="error" />
</module>
<module name="DesignForExtension">
<property name="severity" value="info" />
</module>
<module name="EmptyForInitializerPad">
<property name="severity" value="info" />
<!-- <property name="option" value="" /> -->
</module>
<module name="EmptyStatement">
<property name="severity" value="warning" />
</module>
<module name="EqualsAvoidNull">
<property name="severity" value="error" />
<property name="ignoreEqualsIgnoreCase" value="false" />
</module>
<module name="EqualsHashCode">
<property name="severity" value="error" />
</module>
<module name="FallThrough">
<property name="severity" value="error" />
<property name="checkLastCaseGroup" value="false" />
<!-- <property name="reliefPattern" value="" /> -->
</module>
<module name="FinalClass">
<property name="severity" value="error" />
</module>
<module name="FinalLocalVariable">
<property name="severity" value="warning" />
<!-- <property name="tokens" value="" /> -->
</module>
<module name="FinalParameters">
<property name="severity" value="warning" />
<!-- <property name="tokens" value="" /> -->
</module>
<module name="GenericWhitespace">
<property name="severity" value="info" />
</module>
<module name="HiddenField">
<property name="severity" value="warning" />
<property name="ignoreAbstractMethods" value="True" />
<property name="ignoreConstructorParameter" value="True" />
<!-- <property name="ignoreFormat" value="" /> -->
<property name="ignoreSetter" value="True" />
<property name="tokens" value="VARIABLE_DEF" />
</module>
<module name="HideUtilityClassConstructor">
<property name="severity" value="error" />
</module>
<!-- page 1 ends -->
<module name="IllegalCatch">
<property name="severity" value="error" />
<!-- <property name="illegalClassNames" value="" /> -->
</module>
<module name="IllegalImport">
<property name="severity" value="error" />
<!-- <property name="illegalPkgs" value="" /> -->
</module>
<module name="IllegalInstantiation">
<property name="severity" value="error" />
<property name="classes" value="java.lang.Boolean " />
</module>
<module name="IllegalThrows">
<property name="severity" value="error" />
<!-- <property name="warningdMethodNames" value="" /> -->
<!-- <property name="illegalClassNames" value="" /> -->
</module>
<module name="InnerAssignment">
<property name="severity" value="error" />
<!-- <property name="tokens" value="" /> -->
</module>
<module name="InnerTypeLast">
<property name="severity" value="info" />
</module>
<module name="InterfaceIsType">
<property name="severity" value="error" />
<property name="allowMarkerInterfaces" value="true" />
</module>
<module name="JavaNCSS">
<property name="severity" value="error" />
<property name="classMaximum" value="400" />
<property name="fileMaximum" value="500" />
<property name="methodMaximum" value="40" />
</module>
<module name="LeftCurly">
<property name="severity" value="info" />
<!-- <property name="maxLineLength" value="" /> -->
<!-- <property name="option" value="" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="LineLength">
<property name="severity" value="error" />
<property name="ignorePattern"
value="^\s*\*\s*[^\s]+.+$|^@|^\s*/\*.*\*/|^\s*//.*|^\s*@|^\s*import" />
<property name="max" value="120" />
<!-- <property name="tabWidth" value="" /> -->
</module>
<module name="LocalFinalVariableName">
<property name="severity" value="error" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
</module>
<module name="LocalVariableName">
<property name="severity" value="error" />
<property name="format" value="^([a-z]|[l] [_])[a-zA-Z0-9]*$" />
<!-- <property name="tokens" value="" /> -->
</module>
<module name="MemberName">
<property name="severity" value="error" />
<property name="applyToPackage" value="True" />
<property name="applyToPrivate" value="True" />
<property name="applyToProtected" value="True" />
<property name="applyToPublic" value="True" />
<property name="format" value="^([a-z]|[m][_])[a-zA-Z0-9]*$" />
</module>
<module name="MethodLength">
<property name="severity" value="error" />
<property name="countEmpty" value="true" />
<property name="max" value="50" />
<!-- <property name="tokens" value="" /> -->
</module>
<module name="MethodName">
<property name="severity" value="error" />
<property name="allowClassName" value="False" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
</module>
<module name="MethodParamPad">
<property name="severity" value="info" />
<!-- <property name="allowLineBreaks" value="Default" /> -->
<!-- <property name="option" value="" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="MethodTypeParameterName">
<property name="severity" value="error" />
<property name="format" value="^[A-Z]$" />
</module>
<module name="MissingDeprecated">
<property name="severity" value="info" />
</module>
<module name="MissingOverride">
<property name="severity" value="error" />
<property name="javaFiveCompatibility" value="false" />
</module>
<module name="MissingSwitchDefault">
<property name="severity" value="error" />
</module>
<module name="ModifiedControlVariable">
<property name="severity" value="error" />
</module>
<module name="ModifierOrder">
<property name="severity" value="warning" />
</module>
<module name="MultipleStringLiterals">
<property name="severity" value="error" />
<!-- <property name="allowedDuplicates" value="" /> -->
<!-- <property name="warningOccurrenceContext" value="" /> -->
<!-- <property name="warningStringsRegexp" value="" /> -->
</module>
<module name="MultipleVariableDeclarations">
<property name="severity" value="error" />
</module>
<module name="NeedBraces">
<property name="severity" value="warning" />
<!-- <property name="tokens" value=""/> -->
</module>
<module name="NestedForDepth">
<property name="severity" value="error" />
<property name="max" value="3" />
</module>
<module name="NestedIfDepth">
<property name="severity" value="error" />
<property name="max" value="1" />
</module>
<module name="NestedTryDepth">
<property name="severity" value="warning" />
<property name="max" value="1" />
</module>
<module name="NoFinalizer">
<property name="severity" value="error" />
</module>
<module name="NoWhitespaceAfter">
<property name="severity" value="info" />
<!-- <property name="allowLineBreaks" value="Default" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="NoWhitespaceBefore">
<property name="severity" value="info" />
<!-- <property name="allowLineBreaks" value="Default" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="NPathComplexity">
<property name="severity" value="error" />
<!-- <property name="max" value="" /> -->
</module>
<module name="OneStatementPerLine">
<property name="severity" value="error" />
</module>
<module name="OperatorWrap">
<property name="severity" value="info" />
<!-- <property name="option" value="" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="OuterTypeNumber">
<property name="severity" value="info" />
<!-- <property name="max" value="" /> -->
</module>
<module name="PackageAnnotation">
<property name="severity" value="info" />
</module>
<module name="PackageDeclaration">
<property name="severity" value="error" />
<property name="ignoreDirectoryName" value="false" />
</module>
<module name="PackageName">
<property name="severity" value="error" />
<property name="format" value="[a-z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)*$" />
</module>
<module name="ParameterAssignment">
<property name="severity" value="error" />
</module>
<module name="ParameterName">
<property name="severity" value="error" />
<property name="format" value="^([a-z]|[a][_])[a-zA-Z0-9]*$" />
</module>
<module name="ParameterNumber">
<property name="severity" value="error" />
<!-- <property name="max" value="" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="ParenPad">
<property name="severity" value="info" />
<!-- <property name="option" value="" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="RedundantImport">
<property name="severity" value="warning" />
</module>
<module name="RedundantModifier">
<property name="severity" value="warning" />
<!-- <property name="tokens" value="" /> -->
</module>
<module name="RedundantThrows">
<property name="severity" value="error" />
<property name="allowSubclasses" value="false" />
<property name="allowUnchecked" value="false" />
<property name="suppressLoadErrors" value="true" />
</module>
<module name="ReturnCount">
<property name="severity" value="info" />
<!-- <property name="format" value="" /> -->
<!-- <property name="max" value="" /> -->
</module>
<module name="RightCurly">
<property name="severity" value="info" />
<!-- <property name="option" value="" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="SimplifyBooleanExpression">
<property name="severity" value="error" />
</module>
<module name="SimplifyBooleanReturn">
<property name="severity" value="error" />
</module>
<module name="StaticVariableName">
<property name="severity" value="error" />
<property name="applyToPackage" value="True" />
<property name="applyToPrivate" value="True" />
<property name="applyToProtected" value="True" />
<property name="applyToPublic" value="True" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
</module>
<module name="StringLiteralEquality">
<property name="severity" value="error" />
</module>
<module name="SuperClone">
<property name="severity" value="error" />
</module>
<module name="SuperFinalize">
<property name="severity" value="error" />
</module>
<module name="TrailingComment">
<property name="severity" value="info" />
<property name="format" value="^[\s\}\);]*$" />
<!-- <property name="legalComment" value="" /> -->
</module>
<module name="TypecastParenPad">
<property name="severity" value="info" />
<!-- <property name="option" value="" /> -->
<!-- <property name="tokens" value="" /> -->
</module>
<module name="UncommentedMain">
<property name="severity" value="error" />
<!-- <property name="excludedClasses" value="" /> -->
</module>
<module name="UnnecessaryParentheses">
<property name="severity" value="warning" />
</module>
<module name="UnusedImports">
<property name="severity" value="info" />
<property name="processJavadoc" value="false" />
</module>
<module name="UpperEll">
<property name="severity" value="warning" />
</module>
<module name="VisibilityModifier">
<property name="severity" value="error" />
</module>
<module name="WhitespaceAround">
<property name="severity" value="warning" />
<property name="allowEmptyConstructors" value="false" />
<property name="allowEmptyMethods" value="false" />
<!-- <property name="tokens" value="" /> -->
</module>
</module>