Skip to content

Commit

Permalink
Merge branch '2.6.x' into 2.7.x
Browse files Browse the repository at this point in the history
Closes gh-31780
  • Loading branch information
snicoll committed Jul 18, 2022
2 parents 92a7af4 + febd346 commit 52d4dd9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,7 +63,7 @@ private FailureAnalysis analyzeGenericBindException(BindException cause) {
private void buildDescription(StringBuilder description, ConfigurationProperty property) {
if (property != null) {
description.append(String.format("%n Property: %s", property.getName()));
description.append(String.format("%n Value: %s", property.getValue()));
description.append(String.format("%n Value: \"%s\"", property.getValue()));
description.append(String.format("%n Origin: %s", property.getOrigin()));
}
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,7 +75,7 @@ private FailureAnalysis analyzeBindValidationException(ExceptionDetails details)
private void appendFieldError(StringBuilder description, FieldError error) {
Origin origin = Origin.from(error);
description.append(String.format("%n Property: %s", error.getObjectName() + "." + error.getField()));
description.append(String.format("%n Value: %s", error.getRejectedValue()));
description.append(String.format("%n Value: \"%s\"", error.getRejectedValue()));
if (origin != null) {
description.append(String.format("%n Origin: %s", origin));
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,7 +51,7 @@ private FailureAnalysis analyzeUnboundConfigurationPropertiesException(BindExcep
private void buildDescription(StringBuilder description, ConfigurationProperty property) {
if (property != null) {
description.append(String.format("%n Property: %s", property.getName()));
description.append(String.format("%n Value: %s", property.getValue()));
description.append(String.format("%n Value: \"%s\"", property.getValue()));
description.append(String.format("%n Origin: %s", property.getOrigin()));
}
}
Expand Down
Expand Up @@ -101,7 +101,7 @@ void bindExceptionDueToMapConversionFailure() {
}

private static String failure(String property, String value, String origin, String reason) {
return String.format("Property: %s%n Value: %s%n Origin: %s%n Reason: %s", property, value, origin,
return String.format("Property: %s%n Value: \"%s\"%n Origin: %s%n Reason: %s", property, value, origin,
reason);
}

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -92,7 +92,7 @@ void otherBindExceptionShouldReturnAnalysis() {
}

private static String failure(String property, String value, String reason) {
return String.format("Property: %s%n Value: %s%n Reason: %s", property, value, reason);
return String.format("Property: %s%n Value: \"%s\"%n Reason: %s", property, value, reason);
}

private FailureAnalysis performAnalysis(Class<?> configuration, String... environment) {
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,7 +63,7 @@ void bindExceptionDueToUnboundElements() {
}

private static String failure(String property, String value, String origin, String reason) {
return String.format("Property: %s%n Value: %s%n Origin: %s%n Reason: %s", property, value, origin,
return String.format("Property: %s%n Value: \"%s\"%n Origin: %s%n Reason: %s", property, value, origin,
reason);
}

Expand Down

0 comments on commit 52d4dd9

Please sign in to comment.