commit
a508864d6f
|
@ -28,7 +28,7 @@ import org.springframework.boot.diagnostics.FailureAnalyzer;
|
||||||
*
|
*
|
||||||
* @author Andy Wilkinson
|
* @author Andy Wilkinson
|
||||||
*/
|
*/
|
||||||
class ValidationExceptionFailureAnalzer
|
class ValidationExceptionFailureAnalyzer
|
||||||
extends AbstractFailureAnalyzer<ValidationException> {
|
extends AbstractFailureAnalyzer<ValidationException> {
|
||||||
|
|
||||||
private static final String MISSING_IMPLEMENTATION_MESSAGE = "Unable to create a "
|
private static final String MISSING_IMPLEMENTATION_MESSAGE = "Unable to create a "
|
|
@ -51,7 +51,7 @@ public class GitProperties extends InfoProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the abbreviated id of the commit oir {@code null}.
|
* Return the abbreviated id of the commit or {@code null}.
|
||||||
* @return the short commit id
|
* @return the short commit id
|
||||||
*/
|
*/
|
||||||
public String getShortCommitId() {
|
public String getShortCommitId() {
|
||||||
|
|
|
@ -61,17 +61,17 @@ public abstract class JsonObjectDeserializer<T>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deserialize JSON content into the value type this serializer handles.
|
* Deserialize JSON content into the value type this serializer handles.
|
||||||
* @param jasonParser the source parser used for reading JSON content
|
* @param jsonParser the source parser used for reading JSON content
|
||||||
* @param context Context that can be used to access information about this
|
* @param context Context that can be used to access information about this
|
||||||
* deserialization activity
|
* deserialization activity
|
||||||
* @param codec the {@link ObjectCodec} associated with the parser
|
* @param codec the {@link ObjectCodec} associated with the parser
|
||||||
* @param tree deserialized JSON content as tree expressed using set of
|
* @param tree deserialized JSON content as tree expressed using set of
|
||||||
* {@link TreeNode} instances
|
* {@link TreeNode} instances
|
||||||
* @return the dserialized object
|
* @return the deserialized object
|
||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
* @see #deserialize(JsonParser, DeserializationContext)
|
* @see #deserialize(JsonParser, DeserializationContext)
|
||||||
*/
|
*/
|
||||||
protected abstract T deserializeObject(JsonParser jasonParser,
|
protected abstract T deserializeObject(JsonParser jsonParser,
|
||||||
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class DelegatingFilterProxyRegistrationBeanTests
|
||||||
extends AbstractFilterRegistrationBeanTests {
|
extends AbstractFilterRegistrationBeanTests {
|
||||||
|
|
||||||
private WebApplicationContext applicationContext = new GenericWebApplicationContext(
|
private WebApplicationContext applicationContext = new GenericWebApplicationContext(
|
||||||
new MockServletContext());;
|
new MockServletContext());
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void targetBeanNameMustNotBeNull() throws Exception {
|
public void targetBeanNameMustNotBeNull() throws Exception {
|
||||||
|
|
|
@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for {@link ValidationExceptionFailureAnalzer}
|
* Tests for {@link ValidationExceptionFailureAnalyzer}
|
||||||
*
|
*
|
||||||
* @author Andy Wilkinson
|
* @author Andy Wilkinson
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ public class ValidationExceptionFailureAnalyzerTests {
|
||||||
fail("Expected failure did not occur");
|
fail("Expected failure did not occur");
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
FailureAnalysis analysis = new ValidationExceptionFailureAnalzer()
|
FailureAnalysis analysis = new ValidationExceptionFailureAnalyzer()
|
||||||
.analyze(ex);
|
.analyze(ex);
|
||||||
assertThat(analysis).isNotNull();
|
assertThat(analysis).isNotNull();
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class JsonObjectDeserializerTests {
|
||||||
static class TestJsonObjectDeserializer<T> extends JsonObjectDeserializer<T> {
|
static class TestJsonObjectDeserializer<T> extends JsonObjectDeserializer<T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected T deserializeObject(JsonParser jasonParser,
|
protected T deserializeObject(JsonParser jsonParser,
|
||||||
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class NameAndAgeJsonComponent {
|
||||||
public static class Deserializer extends JsonObjectDeserializer<NameAndAge> {
|
public static class Deserializer extends JsonObjectDeserializer<NameAndAge> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected NameAndAge deserializeObject(JsonParser jasonParser,
|
protected NameAndAge deserializeObject(JsonParser jsonParser,
|
||||||
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
String name = nullSafeValue(tree.get("name"), String.class);
|
String name = nullSafeValue(tree.get("name"), String.class);
|
||||||
|
|
Loading…
Reference in New Issue