diff --git a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java index 712ea287b3..3647ef27d3 100644 --- a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java +++ b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java @@ -280,7 +280,7 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe // HttpUrlConnection strips Content-Length: 0 without setDoOutput(true) String method = connection.getRequestMethod(); if ("POST".equals(method) || "PUT".equals(method)) { - connection.setFixedLengthStreamingMode(0); + connection.setFixedLengthStreamingMode(0L); connection.setDoOutput(true); } } diff --git a/project/pom.xml b/project/pom.xml index 45c8e73787..3a0c19c9be 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -434,6 +434,7 @@ **/.gitignore **/.gitattributes **/.java-version + **/modernizer_exclusions.txt .repository/** @@ -714,6 +715,24 @@ warning + + org.gaul + modernizer-maven-plugin + 1.1.0 + + + modernizer + validate + + modernizer + + + + + 1.7 + resources/modernizer_exclusions.txt + + @@ -1107,6 +1126,17 @@ + + org.gaul + modernizer-maven-plugin + + + org.apache.jclouds + jclouds-resources + ${project.version} + + + diff --git a/resources/checkstyle.xml b/resources/checkstyle.xml index 0be56a34a7..da622023e3 100644 --- a/resources/checkstyle.xml +++ b/resources/checkstyle.xml @@ -88,44 +88,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/modernizer_exclusions.txt b/resources/modernizer_exclusions.txt new file mode 100644 index 0000000000..7fec5afa52 --- /dev/null +++ b/resources/modernizer_exclusions.txt @@ -0,0 +1,19 @@ +com/google/common/base/Charsets.ISO_8859_1:Ljava/nio/charset/Charset; +com/google/common/base/Charsets.US_ASCII:Ljava/nio/charset/Charset; +com/google/common/base/Charsets.UTF_8:Ljava/nio/charset/Charset; +com/google/common/base/Objects.equal:(Ljava/lang/Object;Ljava/lang/Object;)Z +com/google/common/base/Objects.hashCode:([Ljava/lang/Object;)I +com/google/common/collect/Lists.newArrayList:()Ljava/util/ArrayList; +com/google/common/collect/Lists.newArrayListWithCapacity:(I)Ljava/util/ArrayList; +com/google/common/collect/Lists.newLinkedList:()Ljava/util/LinkedList; +com/google/common/collect/Maps.newConcurrentMap:()Ljava/util/concurrent/ConcurrentMap; +com/google/common/collect/Maps.newHashMap:()Ljava/util/HashMap; +com/google/common/collect/Maps.newHashMap:(Ljava/util/Map;)Ljava/util/HashMap; +com/google/common/collect/Maps.newLinkedHashMap:()Ljava/util/LinkedHashMap; +com/google/common/collect/Maps.newLinkedHashMap:(Ljava/util/Map;)Ljava/util/LinkedHashMap; +com/google/common/collect/Maps.newTreeMap:()Ljava/util/TreeMap; +com/google/common/collect/Sets.newHashSet:()Ljava/util/HashSet; +com/google/common/collect/Sets.newLinkedHashSet:()Ljava/util/LinkedHashSet; +com/google/common/collect/Sets.newTreeSet:()Ljava/util/TreeSet; +com/google/common/primitives/Ints.compare:(II)I +com/google/common/primitives/Longs.compare:(JJ)I diff --git a/resources/pom.xml b/resources/pom.xml index 02eac535d7..640421038d 100644 --- a/resources/pom.xml +++ b/resources/pom.xml @@ -37,6 +37,7 @@ ${project.basedir} checkstyle.xml + modernizer_exclusions.txt