Browse Source

Merge branch '6.1.x'

# Conflicts:
#	spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
pull/32467/head
Juergen Hoeller 2 years ago
parent
commit
89d563097f
  1. 3
      spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
  2. 6
      spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupStep.java
  3. 5
      spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java
  4. 4
      spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java
  5. 7
      spring-web/src/main/java/org/springframework/http/DefaultHttpStatusCode.java
  6. 5
      spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletRequest.java
  7. 5
      spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java

3
spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

@ -30,7 +30,6 @@ import java.util.stream.Stream; @@ -30,7 +30,6 @@ import java.util.stream.Stream;
import org.springframework.core.MethodParameter;
import org.springframework.core.ResolvableType;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
@ -751,7 +750,7 @@ public class TypeDescriptor implements Serializable { @@ -751,7 +750,7 @@ public class TypeDescriptor implements Serializable {
private final Annotation[] annotations;
private AnnotatedElementAdapter(@NonNull Annotation[] annotations) {
private AnnotatedElementAdapter(Annotation[] annotations) {
this.annotations = annotations;
}

6
spring-core/src/main/java/org/springframework/core/metrics/jfr/FlightRecorderStartupStep.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2024 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.
@ -21,10 +21,10 @@ import java.util.function.Consumer; @@ -21,10 +21,10 @@ import java.util.function.Consumer;
import java.util.function.Supplier;
import org.springframework.core.metrics.StartupStep;
import org.springframework.lang.NonNull;
/**
* {@link StartupStep} implementation for the Java Flight Recorder.
*
* <p>This variant delegates to a {@link FlightRecorderStartupEvent JFR event extension}
* to collect and record data in Java Flight Recorder.
*
@ -114,12 +114,12 @@ class FlightRecorderStartupStep implements StartupStep { @@ -114,12 +114,12 @@ class FlightRecorderStartupStep implements StartupStep {
add(key, value.get());
}
@NonNull
@Override
public Iterator<Tag> iterator() {
return new TagsIterator();
}
private class TagsIterator implements Iterator<Tag> {
private int idx = 0;

5
spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -63,7 +63,6 @@ import jakarta.servlet.http.Part; @@ -63,7 +63,6 @@ import jakarta.servlet.http.Part;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.LinkedCaseInsensitiveMap;
@ -1020,7 +1019,7 @@ public class MockHttpServletRequest implements HttpServletRequest { @@ -1020,7 +1019,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
}
}
private static String encodeCookies(@NonNull Cookie... cookies) {
private static String encodeCookies(Cookie... cookies) {
return Arrays.stream(cookies)
.map(c -> c.getName() + '=' + (c.getValue() == null ? "" : c.getValue()))
.collect(Collectors.joining("; "));

4
spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -35,7 +35,6 @@ import org.springframework.core.io.ClassPathResource; @@ -35,7 +35,6 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.test.context.TestContext;
import org.springframework.test.context.TestContextAnnotationUtils;
@ -363,7 +362,6 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen @@ -363,7 +362,6 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
}
}
@NonNull
private ResourceDatabasePopulator createDatabasePopulator(MergedSqlConfig mergedSqlConfig) {
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
populator.setSqlScriptEncoding(mergedSqlConfig.getEncoding());

7
spring-web/src/main/java/org/springframework/http/DefaultHttpStatusCode.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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,6 @@ package org.springframework.http; @@ -18,7 +18,6 @@ package org.springframework.http;
import java.io.Serializable;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
/**
@ -80,8 +79,8 @@ final class DefaultHttpStatusCode implements HttpStatusCode, Comparable<HttpStat @@ -80,8 +79,8 @@ final class DefaultHttpStatusCode implements HttpStatusCode, Comparable<HttpStat
@Override
public int compareTo(@NonNull HttpStatusCode o) {
return Integer.compare(this.value, o.value());
public int compareTo(HttpStatusCode other) {
return Integer.compare(this.value, other.value());
}
@Override

5
spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletRequest.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -63,7 +63,6 @@ import jakarta.servlet.http.Part; @@ -63,7 +63,6 @@ import jakarta.servlet.http.Part;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.LinkedCaseInsensitiveMap;
@ -1020,7 +1019,7 @@ public class MockHttpServletRequest implements HttpServletRequest { @@ -1020,7 +1019,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
}
}
private static String encodeCookies(@NonNull Cookie... cookies) {
private static String encodeCookies(Cookie... cookies) {
return Arrays.stream(cookies)
.map(c -> c.getName() + '=' + (c.getValue() == null ? "" : c.getValue()))
.collect(Collectors.joining("; "));

5
spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java

@ -60,7 +60,6 @@ import org.springframework.http.converter.GenericHttpMessageConverter; @@ -60,7 +60,6 @@ import org.springframework.http.converter.GenericHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.server.RequestPath;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
@ -522,7 +521,7 @@ class DefaultServerRequest implements ServerRequest { @@ -522,7 +521,7 @@ class DefaultServerRequest implements ServerRequest {
}
@Override
public boolean addAll(@NonNull Collection<? extends Entry<String, Object>> c) {
public boolean addAll(Collection<? extends Entry<String, Object>> c) {
throw new UnsupportedOperationException();
}
@ -537,7 +536,7 @@ class DefaultServerRequest implements ServerRequest { @@ -537,7 +536,7 @@ class DefaultServerRequest implements ServerRequest {
}
@Override
public boolean retainAll(@NonNull Collection<?> c) {
public boolean retainAll(Collection<?> c) {
throw new UnsupportedOperationException();
}

Loading…
Cancel
Save