diff options
author | Christian Stein <sormuras@gmail.com> | 2016-01-07 12:41:19 +0100 |
---|---|---|
committer | Christian Stein <sormuras@gmail.com> | 2016-01-07 12:41:19 +0100 |
commit | 97f40446edd5f66145bde79c4a7c0de6a88716e9 (patch) | |
tree | 9d6259a050e6a762dbaa7ed9e3015231ebe1cb98 | |
parent | 0a08c07a229eaf482adc1c40618812ee4ff9cbdd (diff) | |
download | javapoet-97f40446edd5f66145bde79c4a7c0de6a88716e9.tar.gz |
Upgrade Maven Checkstyle Plugin to 2.17 using Checkstyle 6.11.2
* Removed redundant modifiers in CodeWriter and TypeSpec
* Module RedundantThrows commented out - it was removed from CS
* Java 8 method reference syntax parsing fixed
-rw-r--r-- | checkstyle.xml | 2 | ||||
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/com/squareup/javapoet/CodeWriter.java | 4 | ||||
-rw-r--r-- | src/main/java/com/squareup/javapoet/TypeSpec.java | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/checkstyle.xml b/checkstyle.xml index 4ce5d98..479f477 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -99,7 +99,7 @@ <module name="InnerAssignment"/> <!--<module name="MagicNumber"/>--> <module name="MissingSwitchDefault"/> - <module name="RedundantThrows"/> + <!--module name="RedundantThrows"/--> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> @@ -104,7 +104,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.13</version> + <version>2.17</version> <configuration> <failsOnError>true</failsOnError> <configLocation>checkstyle.xml</configLocation> diff --git a/src/main/java/com/squareup/javapoet/CodeWriter.java b/src/main/java/com/squareup/javapoet/CodeWriter.java index 31abd5b..df372f5 100644 --- a/src/main/java/com/squareup/javapoet/CodeWriter.java +++ b/src/main/java/com/squareup/javapoet/CodeWriter.java @@ -66,11 +66,11 @@ final class CodeWriter { this(out, " "); } - public CodeWriter(Appendable out, String indent) { + CodeWriter(Appendable out, String indent) { this(out, indent, Collections.<String, ClassName>emptyMap()); } - public CodeWriter(Appendable out, String indent, Map<String, ClassName> importedTypes) { + CodeWriter(Appendable out, String indent, Map<String, ClassName> importedTypes) { this.out = checkNotNull(out, "out == null"); this.indent = checkNotNull(indent, "indent == null"); this.importedTypes = checkNotNull(importedTypes, "importedTypes == null"); diff --git a/src/main/java/com/squareup/javapoet/TypeSpec.java b/src/main/java/com/squareup/javapoet/TypeSpec.java index 974237a..b126be9 100644 --- a/src/main/java/com/squareup/javapoet/TypeSpec.java +++ b/src/main/java/com/squareup/javapoet/TypeSpec.java @@ -321,7 +321,7 @@ public final class TypeSpec { private final Set<Modifier> implicitTypeModifiers; private final Set<Modifier> asMemberModifiers; - private Kind(Set<Modifier> implicitFieldModifiers, + Kind(Set<Modifier> implicitFieldModifiers, Set<Modifier> implicitMethodModifiers, Set<Modifier> implicitTypeModifiers, Set<Modifier> asMemberModifiers) { |