> {
/**
- * name of the key inside the {@code query} dict which holds the elements desired. ex. {@code
+ * name of the key inside the {@code query} dict which holds the elements desired. ex. {@code
* pages}.
*/
protected abstract String query();
/**
- * Parses the contents of a result object.
ex. If {@link #query()} is {@code pages},
- * then this would parse the value of each key in the dict {@code pages}. In the example below,
- * this would first start at line {@code 3}.
+ * Parses the contents of a result object.
+ *
+ *
+ * ex. If {@link #query()} is {@code pages}, then this would parse the value of each key in the
+ * dict {@code pages}. In the example below, this would first start at line {@code 3}.
+ *
+ *
*
* "pages": {
* "2576129": {
diff --git a/example-wikipedia/src/main/java/feign/example/wikipedia/WikipediaExample.java b/example-wikipedia/src/main/java/feign/example/wikipedia/WikipediaExample.java
index 8c6b484bcd..056fda8abb 100644
--- a/example-wikipedia/src/main/java/feign/example/wikipedia/WikipediaExample.java
+++ b/example-wikipedia/src/main/java/feign/example/wikipedia/WikipediaExample.java
@@ -17,11 +17,9 @@
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
-
import feign.Feign;
import feign.Logger;
import feign.Param;
@@ -56,8 +54,7 @@ protected Page build(JsonReader reader) throws IOException {
public static void main(String... args) throws InterruptedException {
Gson gson = new GsonBuilder()
- .registerTypeAdapter(new TypeToken>() {
- }.getType(), pagesAdapter)
+ .registerTypeAdapter(new TypeToken>() {}.getType(), pagesAdapter)
.create();
Wikipedia wikipedia = Feign.builder()
@@ -77,7 +74,7 @@ public static void main(String... args) throws InterruptedException {
* this will lazily continue searches, making new http calls as necessary.
*
* @param wikipedia used to search
- * @param query see {@link Wikipedia#search(String)}.
+ * @param query see {@link Wikipedia#search(String)}.
*/
static Iterator lazySearch(final Wikipedia wikipedia, final String query) {
final Response first = wikipedia.search(query);
diff --git a/jaxb/src/main/java/feign/jaxb/JAXBContextFactory.java b/jaxb/src/main/java/feign/jaxb/JAXBContextFactory.java
index ce9384a0df..61254e5812 100644
--- a/jaxb/src/main/java/feign/jaxb/JAXBContextFactory.java
+++ b/jaxb/src/main/java/feign/jaxb/JAXBContextFactory.java
@@ -25,9 +25,9 @@
import javax.xml.bind.Unmarshaller;
/**
- * Creates and caches JAXB contexts as well as creates Marshallers and Unmarshallers for each context.
- * Since JAXB contexts creation can be an expensive task, JAXB context can be preloaded on factory creation
- * otherwise they will be created and cached dynamically when needed.
+ * Creates and caches JAXB contexts as well as creates Marshallers and Unmarshallers for each
+ * context. Since JAXB contexts creation can be an expensive task, JAXB context can be preloaded on
+ * factory creation otherwise they will be created and cached dynamically when needed.
*/
public final class JAXBContextFactory {
@@ -77,6 +77,7 @@ private JAXBContext getContext(Class> clazz) throws JAXBException {
/**
* Will preload factory's cache with JAXBContext for provided classes
+ *
* @param classes
* @throws JAXBException
*/
diff --git a/jaxrs/src/main/java/feign/jaxrs/JAXRSContract.java b/jaxrs/src/main/java/feign/jaxrs/JAXRSContract.java
index 5a1f954eb2..8e4c7ba2c7 100644
--- a/jaxrs/src/main/java/feign/jaxrs/JAXRSContract.java
+++ b/jaxrs/src/main/java/feign/jaxrs/JAXRSContract.java
@@ -23,7 +23,6 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
-
import static feign.Util.checkState;
import static feign.Util.emptyToNull;
import static feign.Util.removeValues;
@@ -58,7 +57,8 @@ protected void processAnnotationOnClass(MethodMetadata data, Class> clz) {
// added
pathValue = pathValue.substring(0, pathValue.length() - 1);
}
- // jax-rs allows whitespace around the param name, as well as an optional regex. The contract should
+ // jax-rs allows whitespace around the param name, as well as an optional regex. The contract
+ // should
// strip these out appropriately.
pathValue = pathValue.replaceAll("\\{\\s*(.+?)\\s*(:.+?)?\\}", "\\{$1\\}");
data.template().uri(pathValue);
diff --git a/jaxrs/src/test/java/feign/jaxrs/JAXRSContractTest.java b/jaxrs/src/test/java/feign/jaxrs/JAXRSContractTest.java
index 95b8ed1db6..7a60998254 100644
--- a/jaxrs/src/test/java/feign/jaxrs/JAXRSContractTest.java
+++ b/jaxrs/src/test/java/feign/jaxrs/JAXRSContractTest.java
@@ -265,8 +265,9 @@ public void regexPathOnMethodOrType() throws Exception {
.hasUrl("/base/regex/{param1}/{param2}");
assertThat(parseAndValidateMetadata(
- ComplexPathOnType.class, "pathParamWithMultipleRegex", String.class, String.class).template())
- .hasUrl("/{baseparam}/regex/{param1}/{param2}");
+ ComplexPathOnType.class, "pathParamWithMultipleRegex", String.class, String.class)
+ .template())
+ .hasUrl("/{baseparam}/regex/{param1}/{param2}");
}
@Test
@@ -538,11 +539,12 @@ Response pathParamWithMultipleRegex(@PathParam("param1") String param1,
@Path("/{baseparam: [0-9]+}")
interface ComplexPathOnType {
-
+
@GET
@Path("regex/{param1:[0-9]*}/{ param2 : .+}")
- Response pathParamWithMultipleRegex(@PathParam("param1") String param1, @PathParam("param2") String param2);
- }
+ Response pathParamWithMultipleRegex(@PathParam("param1") String param1,
+ @PathParam("param2") String param2);
+ }
interface WithURIParam {
diff --git a/pom.xml b/pom.xml
index 5e572938c5..50f86355b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -479,11 +479,6 @@
validateCodeFormat
-
-
- validateFormat
-
-
diff --git a/travis/publish.sh b/travis/publish.sh
index 26cd8e13e3..80ec874dfb 100755
--- a/travis/publish.sh
+++ b/travis/publish.sh
@@ -159,7 +159,19 @@ if ! is_pull_request && build_started_by_tag; then
fi
# skip license on travis due to #1512
-./mvnw install -nsu -Dlicense.skip=true -DvalidateFormat
+./mvnw install -nsu -Dlicense.skip=true
+
+# formatter errors:
+if [ -z $(git status --porcelain) ];
+then
+ echo "No changes detected, all good"
+else
+ echo "The following files have formatting changes:"
+ git status --porcelain
+ echo ""
+ echo "Please run 'mvn clean install' locally to format files"
+ exit 1
+fi
# If we are on a pull request, our only job is to run tests, which happened above via ./mvnw install
if is_pull_request; then