Browse Source

Polishing

pull/27356/head
Juergen Hoeller 3 years ago
parent
commit
b6c2c11805
  1. 6
      spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java
  2. 4
      spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java

6
spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2021 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.
@ -351,7 +351,9 @@ public class ConstructorArgumentValues { @@ -351,7 +351,9 @@ public class ConstructorArgumentValues {
* @return the ValueHolder for the argument, or {@code null} if none set
*/
@Nullable
public ValueHolder getArgumentValue(int index, @Nullable Class<?> requiredType, @Nullable String requiredName, @Nullable Set<ValueHolder> usedValueHolders) {
public ValueHolder getArgumentValue(int index, @Nullable Class<?> requiredType,
@Nullable String requiredName, @Nullable Set<ValueHolder> usedValueHolders) {
Assert.isTrue(index >= 0, "Index must not be negative");
ValueHolder valueHolder = getIndexedArgumentValue(index, requiredType, requiredName);
if (valueHolder == null) {

4
spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java

@ -1085,7 +1085,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic @@ -1085,7 +1085,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
}
DispatcherType dispatchType = request.getDispatcherType();
boolean initialDispatch = DispatcherType.REQUEST == dispatchType;
boolean initialDispatch = (dispatchType == DispatcherType.REQUEST);
if (failureCause != null) {
if (!initialDispatch) {
@ -1109,7 +1109,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic @@ -1109,7 +1109,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
}
int status = response.getStatus();
String headers = ""; // nothing below trace
String headers = ""; // nothing below trace
if (logger.isTraceEnabled()) {
Collection<String> names = response.getHeaderNames();

Loading…
Cancel
Save