From f36b051071e68b0ccd69aed7c8f5bb9255bd86a8 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 23 Jan 2017 13:47:09 +0100 Subject: [PATCH] Deprecate exceptionIfInvalid for yaml processing See gh-8027 --- .../boot/bind/YamlConfigurationFactory.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/bind/YamlConfigurationFactory.java b/spring-boot/src/main/java/org/springframework/boot/bind/YamlConfigurationFactory.java index fd45de32967..6c14fc2a707 100644 --- a/spring-boot/src/main/java/org/springframework/boot/bind/YamlConfigurationFactory.java +++ b/spring-boot/src/main/java/org/springframework/boot/bind/YamlConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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. @@ -122,6 +122,14 @@ public class YamlConfigurationFactory this.validator = validator; } + /** + * Set a flag to indicate that an exception should be raised if a Validator is + * available and validation fails. + * @param exceptionIfInvalid the flag to set + * @deprecated as of 1.5, do not specify a {@link Validator} if validation should not + * occur + */ + @Deprecated public void setExceptionIfInvalid(boolean exceptionIfInvalid) { this.exceptionIfInvalid = exceptionIfInvalid; }