Skip to content

Commit c4f557d

Browse files
committed
Bumping versions
1 parent 8445b04 commit c4f557d

17 files changed

+139
-123
lines changed

spring-cloud-bus-tests/src/test/java/org/springframework/cloud/bus/BusAmqpIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static void before() {
7373
"spring.rabbitmq.port=" + rabbitMQContainer.getAmqpPort(),
7474
"management.endpoints.web.exposure.include=*", "spring.cloud.bus.id=app:2",
7575
"spring.autoconfigure.exclude=org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration")
76-
.run();
76+
.run();
7777
}
7878

7979
@AfterAll

spring-cloud-bus-tests/src/test/java/org/springframework/cloud/bus/jackson/BusJacksonIntegrationTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ public void testCustomEventSerializes() {
6868
assertThat(this.converter.isMapperCreated()).isFalse();
6969

7070
// set by configuration
71-
assertThat(this.converter.getMapper().getSerializationConfig()
72-
.isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)).isTrue();
71+
assertThat(this.converter.getMapper()
72+
.getSerializationConfig()
73+
.isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)).isTrue();
7374

7475
Map map = this.rest.getForObject("http://localhost:" + this.port + "/date", Map.class);
7576
assertThat(map).containsOnlyKeys("date");

spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusEnvironmentPostProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class BusEnvironmentPostProcessor implements EnvironmentPostProcessor {
4949
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
5050
if (environment.containsProperty(ConditionalOnBusEnabled.SPRING_CLOUD_BUS_ENABLED)) {
5151
if (Boolean.FALSE.toString()
52-
.equalsIgnoreCase(environment.getProperty(ConditionalOnBusEnabled.SPRING_CLOUD_BUS_ENABLED))) {
52+
.equalsIgnoreCase(environment.getProperty(ConditionalOnBusEnabled.SPRING_CLOUD_BUS_ENABLED))) {
5353
return;
5454
}
5555
}

spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusProperties.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ public void setContentType(MimeType contentType) {
105105

106106
@Override
107107
public String toString() {
108-
return new ToStringCreator(this).append("ack", ack).append("trace", trace).append("destination", destination)
109-
.append("id", id).append("contentType", contentType).append("enabled", enabled).toString();
108+
return new ToStringCreator(this).append("ack", ack)
109+
.append("trace", trace)
110+
.append("destination", destination)
111+
.append("id", id)
112+
.append("contentType", contentType)
113+
.append("enabled", enabled)
114+
.toString();
110115

111116
}
112117

@@ -143,8 +148,9 @@ public void setDestinationService(String destinationService) {
143148

144149
@Override
145150
public String toString() {
146-
return new ToStringCreator(this).append("enabled", enabled).append("destinationService", destinationService)
147-
.toString();
151+
return new ToStringCreator(this).append("enabled", enabled)
152+
.append("destinationService", destinationService)
153+
.toString();
148154
}
149155

150156
}

spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeRemoteApplicationEvent.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ else if (!this.values.equals(other.values)) {
8585

8686
@Override
8787
public String toString() {
88-
return new ToStringCreator(this).append("id", getId()).append("originService", getOriginService())
89-
.append("destinationService", getDestinationService()).append("values", values).toString();
88+
return new ToStringCreator(this).append("id", getId())
89+
.append("originService", getOriginService())
90+
.append("destinationService", getDestinationService())
91+
.append("values", values)
92+
.toString();
9093

9194
}
9295

spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RemoteApplicationEvent.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ else if (!this.originService.equals(other.originService)) {
140140

141141
@Override
142142
public String toString() {
143-
return new ToStringCreator(this).append("id", id).append("originService", originService)
144-
.append("destinationService", destinationService).toString();
143+
return new ToStringCreator(this).append("id", id)
144+
.append("originService", originService)
145+
.append("destinationService", destinationService)
146+
.toString();
145147

146148
}
147149

spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/UnknownRemoteApplicationEvent.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ public String getPayloadAsString() {
5959

6060
@Override
6161
public String toString() {
62-
return new ToStringCreator(this).append("id", getId()).append("originService", getOriginService())
63-
.append("destinationService", getDestinationService()).append("typeInfo", typeInfo)
64-
.append("payload", getPayloadAsString()).toString();
62+
return new ToStringCreator(this).append("id", getId())
63+
.append("originService", getOriginService())
64+
.append("destinationService", getDestinationService())
65+
.append("typeInfo", typeInfo)
66+
.append("payload", getPayloadAsString())
67+
.toString();
6568

6669
}
6770

spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventRegistrar.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void registerBeanDefinitions(final AnnotationMetadata importingClassMetad
4747
final BeanDefinitionRegistry registry) {
4848

4949
Map<String, Object> componentScan = importingClassMetadata
50-
.getAnnotationAttributes(RemoteApplicationEventScan.class.getName(), false);
50+
.getAnnotationAttributes(RemoteApplicationEventScan.class.getName(), false);
5151

5252
Set<String> basePackages = new HashSet<>();
5353
for (String pkg : (String[]) componentScan.get("value")) {
@@ -70,7 +70,7 @@ public void registerBeanDefinitions(final AnnotationMetadata importingClassMetad
7070

7171
if (!registry.containsBeanDefinition(BUS_JSON_CONVERTER)) {
7272
BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder
73-
.genericBeanDefinition(BusJacksonMessageConverter.class);
73+
.genericBeanDefinition(BusJacksonMessageConverter.class);
7474
beanDefinitionBuilder.addPropertyValue(PACKAGES_TO_SCAN,
7575
basePackages.toArray(new String[basePackages.size()]));
7676
AbstractBeanDefinition beanDefinition = beanDefinitionBuilder.getBeanDefinition();
@@ -80,16 +80,18 @@ public void registerBeanDefinitions(final AnnotationMetadata importingClassMetad
8080
}
8181
else {
8282
basePackages.addAll(getEarlierPackagesToScan(registry));
83-
registry.getBeanDefinition(BUS_JSON_CONVERTER).getPropertyValues().addPropertyValue(PACKAGES_TO_SCAN,
84-
basePackages.toArray(new String[basePackages.size()]));
83+
registry.getBeanDefinition(BUS_JSON_CONVERTER)
84+
.getPropertyValues()
85+
.addPropertyValue(PACKAGES_TO_SCAN, basePackages.toArray(new String[basePackages.size()]));
8586
}
8687
}
8788

8889
private Set<String> getEarlierPackagesToScan(final BeanDefinitionRegistry registry) {
8990
if (registry.containsBeanDefinition(BUS_JSON_CONVERTER)
9091
&& registry.getBeanDefinition(BUS_JSON_CONVERTER).getPropertyValues().get(PACKAGES_TO_SCAN) != null) {
91-
String[] earlierValues = (String[]) registry.getBeanDefinition(BUS_JSON_CONVERTER).getPropertyValues()
92-
.get(PACKAGES_TO_SCAN);
92+
String[] earlierValues = (String[]) registry.getBeanDefinition(BUS_JSON_CONVERTER)
93+
.getPropertyValues()
94+
.get(PACKAGES_TO_SCAN);
9395
return new HashSet<>(Arrays.asList(earlierValues));
9496
}
9597

spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationClassPathTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public class BusAutoConfigurationClassPathTests {
3232
@Test
3333
public void refreshListenerCreatedWithoutActuator() {
3434
new ApplicationContextRunner().withClassLoader(new FilteredClassLoader("org.springframework.boot.actuate"))
35-
.withConfiguration(AutoConfigurations.of(RefreshAutoConfiguration.class,
36-
PathServiceMatcherAutoConfiguration.class, BusRefreshAutoConfiguration.class))
37-
.run(context -> assertThat(context).hasSingleBean(RefreshListener.class)
38-
.doesNotHaveBean(RefreshBusEndpoint.class));
35+
.withConfiguration(AutoConfigurations.of(RefreshAutoConfiguration.class,
36+
PathServiceMatcherAutoConfiguration.class, BusRefreshAutoConfiguration.class))
37+
.run(context -> assertThat(context).hasSingleBean(RefreshListener.class)
38+
.doesNotHaveBean(RefreshBusEndpoint.class));
3939
}
4040

4141
}

spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationTests.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,16 @@ public void close() {
6565
public void defaultId() {
6666
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class, "--server.port=0");
6767
assertThat(this.context.getBean(BusProperties.class).getId().startsWith("application:0:"))
68-
.as("Wrong ID: " + this.context.getBean(BusProperties.class).getId()).isTrue();
68+
.as("Wrong ID: " + this.context.getBean(BusProperties.class).getId())
69+
.isTrue();
6970
}
7071

7172
@Test
7273
public void inboundNotForSelf() {
7374
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class, "--spring.cloud.bus.id=foo",
7475
"--server.port=0");
7576
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
76-
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "bar", "bar")));
77+
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "bar", "bar")));
7778
assertThat(this.context.getBean(InboundMessageHandlerConfiguration.class).refresh).isNull();
7879
}
7980

@@ -82,7 +83,7 @@ public void inboundFromSelf() {
8283
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class, "--spring.cloud.bus.id=foo",
8384
"--server.port=0");
8485
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
85-
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", (String) null)));
86+
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", (String) null)));
8687
assertThat(this.context.getBean(InboundMessageHandlerConfiguration.class).refresh).isNull();
8788
}
8889

@@ -91,7 +92,7 @@ public void inboundNotFromSelf() {
9192
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class, "--spring.cloud.bus.id=bar",
9293
"--server.port=0");
9394
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
94-
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", (String) null)));
95+
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", (String) null)));
9596
assertThat(this.context.getBean(InboundMessageHandlerConfiguration.class).refresh).isNotNull();
9697
}
9798

@@ -103,7 +104,7 @@ public void inboundNotFromSelfWithAck() throws Exception {
103104
new String[] { "--spring.cloud.bus.id=bar", "--server.port=0",
104105
"--spring.main.allow-bean-definition-overriding=true" });
105106
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
106-
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", (String) null)));
107+
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", (String) null)));
107108
RefreshRemoteApplicationEvent refresh = this.context.getBean(InboundMessageHandlerConfiguration.class).refresh;
108109
assertThat(refresh).isNotNull();
109110
TestStreamBusBridge busBridge = this.context.getBean(TestStreamBusBridge.class);
@@ -135,8 +136,9 @@ public void inboundAckWithTrace() throws InterruptedException {
135136
AckMessageConfiguration.class },
136137
new String[] { "--spring.cloud.bus.trace.enabled=true", "--spring.cloud.bus.id=bar",
137138
"--server.port=0" });
138-
this.context.getBean(BusConsumer.class).accept(new AckRemoteApplicationEvent(this, "foo",
139-
new PathDestinationFactory().getDestination(null), "ID", "bar", RefreshRemoteApplicationEvent.class));
139+
this.context.getBean(BusConsumer.class)
140+
.accept(new AckRemoteApplicationEvent(this, "foo", new PathDestinationFactory().getDestination(null), "ID",
141+
"bar", RefreshRemoteApplicationEvent.class));
140142
AckMessageConfiguration ack = this.context.getBean(AckMessageConfiguration.class);
141143
assertThat(ack.latch.await(5, TimeUnit.SECONDS)).isTrue();
142144
assertThat(ack.event).isNotNull();
@@ -166,7 +168,7 @@ public void inboundNotFromSelfPathPattern() {
166168
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class, "--spring.cloud.bus.id=bar:1000",
167169
"--server.port=0");
168170
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
169-
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", "bar:*")));
171+
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", "bar:*")));
170172
assertThat(this.context.getBean(InboundMessageHandlerConfiguration.class).refresh).isNotNull();
171173
}
172174

@@ -175,7 +177,7 @@ public void inboundNotFromSelfDeepPathPattern() {
175177
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class,
176178
"--spring.cloud.bus.id=bar:test:1000", "--server.port=0");
177179
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
178-
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", "bar:**")));
180+
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", "bar:**")));
179181
assertThat(this.context.getBean(InboundMessageHandlerConfiguration.class).refresh).isNotNull();
180182
}
181183

@@ -184,7 +186,7 @@ public void inboundNotFromSelfFlatPattern() {
184186
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class, "--spring.cloud.bus.id=bar",
185187
"--server.port=0");
186188
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
187-
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", "bar*")));
189+
.send(new GenericMessage<>(new RefreshRemoteApplicationEvent(this, "foo", "bar*")));
188190
assertThat(this.context.getBean(InboundMessageHandlerConfiguration.class).refresh).isNotNull();
189191
}
190192

@@ -194,7 +196,7 @@ public void inboundNotFromSelfUnknown() {
194196
this.context = SpringApplication.run(InboundMessageHandlerConfiguration.class, "--spring.cloud.bus.id=bar",
195197
"--server.port=0");
196198
this.context.getBean(BusConstants.INPUT, MessageChannel.class)
197-
.send(new GenericMessage<>(new UnknownRemoteApplicationEvent(this, "UnknownEvent", "yada".getBytes())));
199+
.send(new GenericMessage<>(new UnknownRemoteApplicationEvent(this, "UnknownEvent", "yada".getBytes())));
198200
// No Exception expected
199201
}
200202

0 commit comments

Comments
 (0)