diff --git a/pom.xml b/pom.xml
index 017f37d2c..69428e411 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,10 +79,24 @@
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven-compiler-plugin.version}
+
+ ${java.version}
+ ${java.version}
+ -parameters
+
+
org.apache.maven.plugins
maven-checkstyle-plugin
+
+ io.spring.javaformat
+ spring-javaformat-maven-plugin
+
diff --git a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitAdminException.java b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitAdminException.java
index a9b69e1f7..179064109 100644
--- a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitAdminException.java
+++ b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitAdminException.java
@@ -16,9 +16,9 @@
package org.springframework.cloud.stream.binder.rabbit.admin;
-
/**
* Exceptions thrown while interfacing with the RabbitMQ admin plugin.
+ *
* @author Gary Russell
* @since 1.2
*/
diff --git a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitBindingCleaner.java b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitBindingCleaner.java
index 6f56b3490..c5e7449fe 100644
--- a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitBindingCleaner.java
+++ b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/admin/RabbitBindingCleaner.java
@@ -30,9 +30,10 @@ import org.springframework.cloud.stream.binder.BindingCleaner;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
-
/**
- * Implementation of {@link org.springframework.cloud.stream.binder.BindingCleaner} for the {@code RabbitBinder}.
+ * Implementation of {@link org.springframework.cloud.stream.binder.BindingCleaner} for
+ * the {@code RabbitBinder}.
+ *
* @author Gary Russell
* @author David Turanski
* @since 1.2
@@ -47,28 +48,28 @@ public class RabbitBindingCleaner implements BindingCleaner {
@Override
public Map> clean(String entity, boolean isJob) {
- return clean("http://localhost:15672", "guest", "guest", "/", BINDER_PREFIX, entity, isJob);
- }
-
- public Map> clean(String adminUri, String user, String pw, String vhost,
- String binderPrefix, String entity, boolean isJob) {
- return doClean(
- adminUri == null ? "http://localhost:15672" : adminUri,
- user == null ? "guest" : user,
- pw == null ? "guest" : pw,
- vhost == null ? "/" : vhost,
- binderPrefix == null ? BINDER_PREFIX : binderPrefix,
+ return clean("http://localhost:15672", "guest", "guest", "/", BINDER_PREFIX,
entity, isJob);
}
- private Map> doClean(String adminUri, String user, String pw, String vhost,
- String binderPrefix, String entity, boolean isJob) {
- RestTemplate restTemplate = RabbitManagementUtils.buildRestTemplate(adminUri, user, pw);
- List removedQueues = isJob
- ? null
+ public Map> clean(String adminUri, String user, String pw,
+ String vhost, String binderPrefix, String entity, boolean isJob) {
+ return doClean(adminUri == null ? "http://localhost:15672" : adminUri,
+ user == null ? "guest" : user, pw == null ? "guest" : pw,
+ vhost == null ? "/" : vhost,
+ binderPrefix == null ? BINDER_PREFIX : binderPrefix, entity, isJob);
+ }
+
+ private Map> doClean(String adminUri, String user, String pw,
+ String vhost, String binderPrefix, String entity, boolean isJob) {
+ RestTemplate restTemplate = RabbitManagementUtils.buildRestTemplate(adminUri,
+ user, pw);
+ List removedQueues = isJob ? null
: findStreamQueues(adminUri, vhost, binderPrefix, entity, restTemplate);
- List removedExchanges = findExchanges(adminUri, vhost, binderPrefix, entity, restTemplate);
- // Delete the queues in reverse order to enable re-running after a partial success.
+ List removedExchanges = findExchanges(adminUri, vhost, binderPrefix,
+ entity, restTemplate);
+ // Delete the queues in reverse order to enable re-running after a partial
+ // success.
// The queue search above starts with 0 and terminates on a not found.
for (int i = removedQueues.size() - 1; i >= 0; i--) {
String queueName = removedQueues.get(i);
@@ -100,9 +101,10 @@ public class RabbitBindingCleaner implements BindingCleaner {
return results;
}
- private List findStreamQueues(String adminUri, String vhost, String binderPrefix, String stream,
- RestTemplate restTemplate) {
- String queueNamePrefix = adjustPrefix(AbstractBinder.applyPrefix(binderPrefix, stream));
+ private List findStreamQueues(String adminUri, String vhost,
+ String binderPrefix, String stream, RestTemplate restTemplate) {
+ String queueNamePrefix = adjustPrefix(
+ AbstractBinder.applyPrefix(binderPrefix, stream));
List