Merge pull request #48620 from izeye

* pr/48620:
  Polish

Closes gh-48620
This commit is contained in:
Stéphane Nicoll
2025-12-26 08:58:32 +01:00
5 changed files with 9 additions and 9 deletions
@@ -40,10 +40,10 @@ class CacheCondition extends SpringBootCondition {
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
Assert.isInstanceOf(AnnotationMetadata.class, metadata);
return extracted(context, (AnnotationMetadata) metadata);
return getOutcome(context, (AnnotationMetadata) metadata);
}
private ConditionOutcome extracted(ConditionContext context, AnnotationMetadata metadata) {
private ConditionOutcome getOutcome(ConditionContext context, AnnotationMetadata metadata) {
String sourceClass = metadata.getClassName();
ConditionMessage.Builder message = ConditionMessage.forCondition("Cache", sourceClass);
Environment environment = context.getEnvironment();
@@ -52,7 +52,7 @@ class CacheCondition extends SpringBootCondition {
if (!specified.isBound()) {
return ConditionOutcome.match(message.because("automatic cache type"));
}
CacheType required = CacheConfigurations.getType(metadata.getClassName());
CacheType required = CacheConfigurations.getType(sourceClass);
if (specified.get() == required) {
return ConditionOutcome.match(message.because(specified.get() + " cache type"));
}
@@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
class MongoPropertiesTests {
@Test
void defaultUUidRepresentationIsAlignedWithSpringData() {
void defaultUuidRepresentationIsAlignedWithSpringData() {
UuidRepresentation springDataDefault = springDataDefaultUuidRepresentation();
UuidRepresentation springBootDefault = new MongoProperties().getUuidRepresentation();
assertThat(springBootDefault).isEqualTo(springDataDefault);
@@ -324,7 +324,7 @@ class HttpClientTransportTests {
}
@Test
void shouldReturnErrorsAndConentIfProxyAuthError() throws IOException {
void shouldReturnContentIfProxyAuthError() throws IOException {
givenClientWillReturnResponse();
given(this.entity.getContent()).willReturn(getClass().getResourceAsStream("proxy-error.txt"));
given(this.response.getCode()).willReturn(HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED);
@@ -332,7 +332,7 @@ class HttpClientTransportTests {
.satisfies((ex) -> {
assertThat(ex.getErrors()).isNull();
assertThat(ex.getResponseMessage()).isNull();
assertThat(ex.getMessage()).contains("Some kind of procy auth problem!");
assertThat(ex.getMessage()).contains("Some kind of proxy auth problem!");
});
}
@@ -1,2 +1,2 @@
Some kind of procy auth problem!
Some kind of proxy auth problem!
@@ -304,7 +304,7 @@ public interface JsonWriter<T> {
}
/**
* Add the a {@link NameProcessor} to be applied when the JSON is written.
* Add a {@link NameProcessor} to be applied when the JSON is written.
* @param nameProcessor the name processor to add
*/
public void applyingNameProcessor(NameProcessor nameProcessor) {
@@ -313,7 +313,7 @@ public interface JsonWriter<T> {
}
/**
* Add the a {@link ValueProcessor} to be applied when the JSON is written.
* Add a {@link ValueProcessor} to be applied when the JSON is written.
* @param valueProcessor the value processor to add
*/
public void applyingValueProcessor(ValueProcessor<?> valueProcessor) {