Polish contribution
See gh-21130
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user