Polish contribution

See gh-21130
pull/21207/head
Stephane Nicoll 5 years ago
parent a989879dbc
commit 4165863859

@ -117,7 +117,10 @@ class ValueObjectBinder implements DataObjectBinder {
}
private boolean isEmptyDefaultValueAllowed(Class<?> type) {
return !type.isPrimitive() && !type.isEnum() && !isAggregate(type) && !type.getName().startsWith("java.lang");
if (type.isPrimitive() || type.isEnum() || isAggregate(type) || type.getName().startsWith("java.lang")) {
return false;
}
return true;
}
private boolean isAggregate(Class<?> type) {

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.

@ -18,7 +18,7 @@ package org.springframework.boot.web.embedded.tomcat;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.apache.catalina.Container;
@ -107,7 +107,7 @@ class TomcatGracefulShutdown implements GracefulShutdown {
private List<Connector> getConnectors() {
List<Connector> connectors = new ArrayList<>();
for (Service service : this.tomcat.getServer().findServices()) {
connectors.addAll(Arrays.asList(service.findConnectors()));
Collections.addAll(connectors, service.findConnectors());
}
return connectors;
}

Loading…
Cancel
Save