mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-10 11:29:20 +00:00
Merge branch '2.0.x' into 2.1.x
Closes gh-17078
This commit is contained in:
+1
-2
@@ -36,8 +36,7 @@ public class SamplePropertiesValidator implements Validator {
|
||||
ValidationUtils.rejectIfEmpty(errors, "host", "host.empty");
|
||||
ValidationUtils.rejectIfEmpty(errors, "port", "port.empty");
|
||||
SampleProperties properties = (SampleProperties) o;
|
||||
if (properties.getHost() != null
|
||||
&& !this.pattern.matcher(properties.getHost()).matches()) {
|
||||
if (properties.getHost() != null && !this.pattern.matcher(properties.getHost()).matches()) {
|
||||
errors.rejectValue("host", "Invalid host");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user