language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-web/src/main/java/org/springframework/http/server/reactive/ServletHttpHandlerAdapter.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -200,7 +200,7 @@ public void service(Servlet... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-web/src/main/java/org/springframework/http/server/reactive/TomcatHttpHandlerAdapter.java | @@ -67,7 +67,7 @@ public TomcatHttpHandlerAdapter(HttpHandler httpHandler) {
protected ServletServerHttpRequest createRequest(HttpServletRequest request, AsyncContext asyncContext)
throws IOException, URISyntaxException {
- Assert.notNull(getServletPath(), "Servlet path is not initialized");
+ Assert.state(ge... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -128,7 +128,7 @@ public void startAsync() {
... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-web/src/main/java/org/springframework/web/server/adapter/AbstractReactiveWebInitializer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -28,6 +28,8 @@
import org.springframework.h... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-web/src/test/java/org/springframework/http/client/support/ProxyFactoryBeanTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -19,7 +19,6 @@
import java.net.InetSocketAd... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java | @@ -374,7 +374,7 @@ protected void exposeUriTemplateVariables(Map<String, String> uriTemplateVariabl
@Override
@Nullable
public RequestMatchResult match(HttpServletRequest request, String pattern) {
- Assert.isNull(getPatternParser(), "This HandlerMapping uses PathPatterns.");
+ Assert.state(getPatternParser() ... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -158,7 +158,7 @@ private <T> T doWithMatchin... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/PathPatternMatchableHandlerMapping.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -59,7 +59,7 @@ public PathPatternMatchableHa... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java | @@ -448,7 +448,7 @@ public static MethodArgumentBuilder fromMappingName(String mappingName) {
*/
public static MethodArgumentBuilder fromMappingName(@Nullable UriComponentsBuilder builder, String name) {
WebApplicationContext wac = getWebApplicationContext();
- Assert.notNull(wac, "No WebApplicationContext");
... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java | @@ -454,7 +454,7 @@ private void updateConsumesCondition(RequestMappingInfo info, Method method) {
@Override
public RequestMatchResult match(HttpServletRequest request, String pattern) {
- Assert.isNull(getPatternParser(), "This HandlerMapping requires a PathPattern");
+ Assert.state(getPatternParser() == null,... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -625,8 +625,8 @@ protected Resource getResou... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/support/AbstractDispatcherServletInitializer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -31,6 +31,7 @@
import org.springframework.l... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MarshallingView.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -97,7 +97,7 @@ public void setModelKey(Strin... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -267,7 +267,7 @@ public Stats getStats() {
... | true |
Other | spring-projects | spring-framework | abf3400c07da1e7e98c44388a5fbbd1a89cea0d8.json | Use Assert.state() where appropriate | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -84,7 +84,7 @@ protected SockJsServiceConfig... | true |
Other | spring-projects | spring-framework | 0b21c16fa8610950ec0eb0127c7312a6679f0c9e.json | Suppress unused warning in test code | spring-context/src/testFixtures/java/org/springframework/context/testfixture/context/annotation/AutowiredGenericTemplate.java | @@ -20,6 +20,7 @@
public class AutowiredGenericTemplate {
+ @SuppressWarnings("unused")
private GenericTemplate<Integer> genericTemplate;
@Autowired | false |
Other | spring-projects | spring-framework | 698f8995f72239d11052e1319c6b2802a34ba3e8.json | Revise TestSocketUtils and tests
Closes gh-29132 | spring-test/src/main/java/org/springframework/test/util/TestSocketUtils.java | @@ -22,69 +22,98 @@
import javax.net.ServerSocketFactory;
+import org.springframework.util.Assert;
+
/**
- * Simple utility methods for finding available ports on {@code localhost} for
- * use in integration testing scenarios.
- *
- * <p>This is a limited form of {@code SocketUtils} which is deprecated in Spring
... | true |
Other | spring-projects | spring-framework | 698f8995f72239d11052e1319c6b2802a34ba3e8.json | Revise TestSocketUtils and tests
Closes gh-29132 | spring-test/src/test/java/org/springframework/test/util/TestSocketUtilsTests.java | @@ -16,11 +16,8 @@
package org.springframework.test.util;
-import javax.net.ServerSocketFactory;
-
+import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;
-import org.mockito.MockedStatic;
-import org.mockito.Mockito;
import static org.assertj.core.api.Assertions.assertThat;
import stat... | true |
Other | spring-projects | spring-framework | 698f8995f72239d11052e1319c6b2802a34ba3e8.json | Revise TestSocketUtils and tests
Closes gh-29132 | spring-test/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker | @@ -1 +0,0 @@
-mock-maker-inline | true |
Other | spring-projects | spring-framework | 07ba13c9ca8f1da0833eb044b3ea3d1d6fb43c96.json | Remove superfluous method override | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java | @@ -160,13 +160,6 @@ public String[] getHosts() {
return this.hosts;
}
-
- @Override
- public void afterPropertiesSet() throws Exception {
- super.afterPropertiesSet();
- }
-
-
@Override
public boolean isRedirectView() {
return true; | false |
Other | spring-projects | spring-framework | 5421a36c8fef53fbcd2613631f019bd6e2d5dbf9.json | Add section on runtime hints
See gh-29350 | framework-docs/src/docs/asciidoc/core/core-aot.adoc | @@ -93,7 +93,7 @@ Each implementation can return an AOT contribution, based on the state of the be
An AOT contribution is a component that contributes generated code that reproduce a particular behavior.
It can also contribute `RuntimeHints` to indicate the need for reflection, resource loading, serialization, or JDK... | false |
Other | spring-projects | spring-framework | 3573022b962a8f133b875bb0c1c4bb9556c1d245.json | Fix version change in previous commit | gradle.properties | @@ -1,4 +1,4 @@
-version=6.0.0-RC4
+version=6.0.0-SNAPSHOT
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2048m | false |
Other | spring-projects | spring-framework | f50b472ceb6fc2fa25675672bdd0ca422ed8000f.json | Ignore HttpComponents Javadoc
Closes gh-29479 | build.gradle | @@ -117,7 +117,7 @@ configure([rootProject] + javaProjects) { project ->
"https://fasterxml.github.io/jackson-core/javadoc/2.10/",
"https://fasterxml.github.io/jackson-databind/javadoc/2.10/",
"https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.10/",
- "https://hc.apache.org/httpcomponents-clien... | false |
Other | spring-projects | spring-framework | 1f0a35bacc8c35b75c72cc53b7f842c569eb9165.json | Remove outdated documentation in @Reflective | spring-core/src/main/java/org/springframework/aot/hint/annotation/Reflective.java | @@ -32,9 +32,6 @@
* the annotated element. By default, a reflection hint is added on the
* annotated element so that it can be discovered and invoked if necessary.
*
- * <p>A reflection hint is also added if necessary on the annotation that
- * <em>directly</em> uses this annotation.
- *
* @author Stephane Nico... | false |
Other | spring-projects | spring-framework | 3ff308403a8608489706c18fc0c888e38e7dfedb.json | Fix two typos in integration.adoc and webflux.adoc
- Change "you ca" to "you can" in webflux.adoc
- English names can be used in "month" field instead of "day-of-month"
field in cron expressions in integration.adoc
Closes gh-29469 | src/docs/asciidoc/integration.adoc | @@ -5350,7 +5350,7 @@ asterisk.
* Two numbers separated with a hyphen (`-`) express a range of numbers.
The specified range is inclusive.
* Following a range (or `*`) with `/` specifies the interval of the number's value through the range.
-* English names can also be used for the day-of-month and day-of-week fields... | true |
Other | spring-projects | spring-framework | 3ff308403a8608489706c18fc0c888e38e7dfedb.json | Fix two typos in integration.adoc and webflux.adoc
- Change "you ca" to "you can" in webflux.adoc
- English names can be used in "month" field instead of "day-of-month"
field in cron expressions in integration.adoc
Closes gh-29469 | src/docs/asciidoc/web/webflux.adoc | @@ -1541,7 +1541,7 @@ extracts the name, version, and file extension:
URI path patterns can also have embedded `${...}` placeholders that are resolved on startup
through `PropertySourcesPlaceholderConfigurer` against local, system, environment, and
-other property sources. You ca use this to, for example, parameter... | true |
Other | spring-projects | spring-framework | 385292dc41c62e96a083c41c9c686825db251d63.json | Fix Checkstyle violations
See gh-29163 | spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java | @@ -745,7 +745,8 @@ protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource
FileSystem fileSystem;
try {
fileSystem = FileSystems.getFileSystem(rootDirResource.getURI().resolve("/"));
- } catch (Exception e) {
+ }
+ catch (Exception ex) {
fileSystem = FileSystems.newFileSystem(... | false |
Other | spring-projects | spring-framework | c5fc0a5ef3fb85a69fd8d9f92c86a2798344df98.json | Add shortcut in TestGenerationContext | spring-core-test/src/main/java/org/springframework/aot/test/generate/TestGenerationContext.java | @@ -51,12 +51,21 @@ public TestGenerationContext(ClassNameGenerator classNameGenerator) {
/**
* Create an instance using the specified {@code target}.
- * @param target the default target class to use
+ * @param target the default target class name to use
*/
public TestGenerationContext(ClassName target) ... | false |
Other | spring-projects | spring-framework | ff844ed99f90c36dfcfa16086d75665671ab9e97.json | Allow overriding invokeSuspendingFunction
This commit isolates the invocation of Kotlin coroutines into a separate
template method, so that it can be overridden in subclasses of
RequestMappingHandlerAdapter.
Closes gh-27195 | spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java | @@ -21,6 +21,9 @@
import java.util.Arrays;
import org.springframework.context.MessageSource;
+import org.jetbrains.annotations.NotNull;
+import org.reactivestreams.Publisher;
+
import org.springframework.core.CoroutinesUtils;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframew... | false |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java | @@ -2020,7 +2020,7 @@ void beanProviderWithParentBeanFactoryReuseOrder() {
lbf.setParentBeanFactory(parentBf);
lbf.registerBeanDefinition("low", new RootBeanDefinition(LowPriorityTestBean.class));
List<Class<?>> orderedTypes = lbf.getBeanProvider(TestBean.class).orderedStream()
- .map(Object::getClass).coll... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java | @@ -37,7 +37,6 @@
import java.util.concurrent.Callable;
import java.util.function.Consumer;
import java.util.function.Function;
-import java.util.stream.Collectors;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -3016,11 +3015,11 @@ public List<TestBean> forEachTestBeans() {
... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java | @@ -883,12 +883,12 @@ void testGenericMatchingWithFullTypeDifferentiation() {
assertThat(resolved.get(0)).isSameAs(bf.getBean("store1"));
assertThat(resolved.get(1)).isSameAs(bf.getBean("store2"));
- resolved = numberStoreProvider.stream().collect(Collectors.toList());
+ resolved = numberStoreProvider.stream(... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-context-indexer/src/test/java/org/springframework/context/index/processor/Metadata.java | @@ -18,7 +18,6 @@
import java.util.Arrays;
import java.util.List;
-import java.util.stream.Collectors;
import org.assertj.core.api.Condition;
@@ -30,7 +29,7 @@
class Metadata {
public static Condition<CandidateComponentsMetadata> of(Class<?> type, Class<?>... stereotypes) {
- return of(type.getName(), Ar... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java | @@ -19,7 +19,6 @@
import java.util.List;
import java.util.function.Function;
import java.util.function.Supplier;
-import java.util.stream.Collectors;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
@@ -77,7 +76,7 @@ public void setImportMeta... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-context/src/main/java/org/springframework/scheduling/annotation/AbstractAsyncConfiguration.java | @@ -20,7 +20,6 @@
import java.util.concurrent.Executor;
import java.util.function.Function;
import java.util.function.Supplier;
-import java.util.stream.Collectors;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.beans.factory.ObjectProvider;
@@ -72,7 +71,7 @@... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBeanMethodTests.java | @@ -18,7 +18,6 @@
import java.util.Comparator;
import java.util.List;
-import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
@@ -156,7 +155,7 @@ private static ConfigurationClassParser newParser() {
private static List<BeanMethod> getBeanMethods(ConfigurationClass configurationClass) {
Li... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-context/src/testFixtures/java/org/springframework/context/testfixture/index/CandidateComponentsTestClassLoader.java | @@ -20,7 +20,6 @@
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.context.index.CandidateComponentsIndexLoader;
@@ -63,7 +62,7 @@ public static ClassLoader index(ClassLoader classLoade... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-core-test/src/main/java/org/springframework/aot/agent/RecordedInvocation.java | @@ -18,7 +18,6 @@
import java.util.Arrays;
import java.util.List;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.springframework.aot.hint.RuntimeHints;
@@ -153,7 +152,7 @@ public List<TypeReference> getArgumentTypes() {
* @return the argument types, starting at the given inde... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-core/src/jmh/java/org/springframework/core/convert/support/GenericConversionServiceBenchmark.java | @@ -66,7 +66,7 @@ public static class ListBenchmarkState extends BenchmarkState {
@Setup(Level.Trial)
public void setup() throws Exception {
- this.source = IntStream.rangeClosed(1, collectionSize).mapToObj(String::valueOf).collect(Collectors.toList());
+ this.source = IntStream.rangeClosed(1, collectionSiz... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-core/src/main/java/org/springframework/core/KotlinReflectionParameterNameDiscoverer.java | @@ -19,7 +19,6 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.stream.Collectors;
import kotlin.reflect.KFunction;
import kotlin.reflect.KParameter;
@@ -77,7 +76,7 @@ private String[] getParameterNames(List<KParameter> parameters) {
.stream(... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java | @@ -29,7 +29,6 @@
import java.util.Map;
import java.util.Random;
import java.util.function.BiPredicate;
-import java.util.stream.Collectors;
import org.springframework.lang.Nullable;
@@ -292,7 +291,7 @@ public static List<MimeType> parseMimeTypes(String mimeTypes) {
return tokenize(mimeTypes).stream()
.... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationPredicatesTests.java | @@ -22,7 +22,6 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
@@ -95,7 +94,7 @@ void firstRunOfAcceptsOnlyFirstRun() {
List<MergedAnnotation<TestAnnotation>> filtered = MergedAnnotations.from(
WithM... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java | @@ -33,7 +33,6 @@
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import jakarta.annotation.Resource;
@@ -1896,7 +1895,7 @@ void synthesizeFromMapWithNestedArrayOfMaps() throws Exception {
Adapt.ANNOTA... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBufferFactory.java | @@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.stream.Collectors;
import io.netty.buffer.PooledByteBufAllocator;
import org.apache.commons.logging.Log;
@@ -140,7 +139,7 @@ public DataBuffer join(List<? extends DataBuffer> d... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-test/src/main/java/org/springframework/test/context/support/TestPropertySourceUtils.java | @@ -26,7 +26,6 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -88,7 +87,7 @@ static MergedTestPropertySources buildMergedTestPropertySources(Class<?> testCla
... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/HttpHeaders.java | @@ -486,7 +486,7 @@ public void setAcceptLanguage(List<Locale.LanguageRange> languages) {
range.getWeight() == Locale.LanguageRange.MAX_WEIGHT ?
range.getRange() :
range.getRange() + ";q=" + decimal.format(range.getWeight()))
- .collect(Collectors.toList());
+ .toList();
set(ACCEPT_LAN... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/client/reactive/AbstractClientHttpRequest.java | @@ -20,7 +20,6 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;
-import java.util.stream.Collectors;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
@@ -149,7 +148,7 @@ protected Mono<Void> doCommit(@Nullable Supplier<? ex... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/client/reactive/JettyHeadersAdapter.java | @@ -23,7 +23,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
@@ -177,7 +176,7 @@ public Set<String> keySet() {
@Override
public Collection<List<String>> values() {
... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/client/reactive/Netty5HeadersAdapter.java | @@ -22,7 +22,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import io.netty5.handler.codec.http.HttpHeaders;
@@ -165,7 +164,7 @@ public Set<String> keySet() {
@Override
public Collection<List<String>> values() {
return this.headers.names().str... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/client/reactive/NettyHeadersAdapter.java | @@ -22,7 +22,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import io.netty.handler.codec.http.HttpHeaders;
@@ -164,7 +163,7 @@ public Set<String> keySet() {
@Override
public Collection<List<String>> values() {
return this.headers.names().stre... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/codec/protobuf/ProtobufEncoder.java | @@ -20,7 +20,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.stream.Collectors;
import com.google.protobuf.Message;
import org.reactivestreams.Publisher;
@@ -61,7 +60,7 @@ public class ProtobufEncoder extends ProtobufCodecSupport implements HttpMessage
.strea... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/server/reactive/JettyHeadersAdapter.java | @@ -23,7 +23,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
@@ -161,7 +160,7 @@ public Set<String> keySet() {
@Override
public Collection<List<String>> values() {
... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/server/reactive/Netty5HeadersAdapter.java | @@ -22,7 +22,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import io.netty5.handler.codec.http.HttpHeaders;
@@ -163,7 +162,7 @@ public Set<String> keySet() {
@Override
public Collection<List<String>> values() {
return this.headers.names().str... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/server/reactive/NettyHeadersAdapter.java | @@ -22,7 +22,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import io.netty.handler.codec.http.HttpHeaders;
@@ -163,7 +162,7 @@ public Set<String> keySet() {
@Override
public Collection<List<String>> values() {
return this.headers.names().stre... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/http/server/reactive/TomcatHeadersAdapter.java | @@ -24,7 +24,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.http.MimeHeaders;
@@ -172,7 +171,7 @@ public Set<String> keySet() {
@Override
public Collection<List<String... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/web/bind/support/WebExchangeDataBinder.java | @@ -19,7 +19,6 @@
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-import java.util.stream.Collectors;
import reactor.core.publisher.Mono;
@@ -124,7 +123,7 @@ protected static void addBindValue(Map<String, Object> params, String key, List<
if (!CollectionUtils.isEmpty(values)) {
va... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/web/client/RestTemplate.java | @@ -25,7 +25,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import io.micrometer.observation.Observation;
@@ -971,7 +970,7 @@ public void doWithRequest(ClientHttpRequest request) throws IOException {
.filter(conv... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java | @@ -25,7 +25,6 @@
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.util.stream.Collectors;
import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable;
@@ -136,7 +135,7 @@ public CorsConfiguration(CorsConfiguration other) {
*/
public... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/web/server/adapter/WebHttpHandlerBuilder.java | @@ -21,7 +21,6 @@
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
-import java.util.stream.Collectors;
import reactor.blockhound.BlockHound;
import reactor.blockhound.integration.BlockHoundIntegration;
@@ -170,13 +169,13 @@ public static WebHttpHandlerBuilder applic... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java | @@ -20,7 +20,6 @@
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
-import java.util.stream.Collectors;
import org.springframework.http.HttpCookie;
import org.springframework.http.ResponseCookie;
@@ -100,7 +99,7 @@ public List<String> resolveSessionIds(ServerWebExchange ex... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java | @@ -27,7 +27,6 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import java.util.stream.Collectors;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
@@ -523,7 +522,7 @@ void keepGivenAcceptHeaderOnPut() throws Exception {
final List<List<String... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/accept/RequestedContentTypeResolverBuilder.java | @@ -23,7 +23,6 @@
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
-import java.util.stream.Collectors;
import org.springframework.http.MediaType;
import org.springframework.lang.Nullable;
@@ -88,7 +87,7 @@ public void resolver(RequestedContentTypeResolver resolver) {
*/
publ... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurerComposite.java | @@ -20,7 +20,6 @@
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
-import java.util.stream.Collectors;
import org.springframework.format.FormatterRegistry;
import org.springframework.http.codec.ServerCodecConfigurer;
@@ -109,7 +108,7 @@ public void configureViewResolvers(View... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java | @@ -20,7 +20,6 @@
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;
-import java.util.stream.Collectors;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
@@ -203,7 +202,7 @@ private static <T, S extends Publisher<T>> S readWithMessageReade... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/function/BodyInserters.java | @@ -17,7 +17,6 @@
package org.springframework.web.reactive.function;
import java.util.List;
-import java.util.stream.Collectors;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Mono;
@@ -386,7 +385,7 @@ private static UnsupportedMediaTypeException unsupportedError(ResolvableType bod
Lis... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java | @@ -30,7 +30,6 @@
import java.util.function.IntPredicate;
import java.util.function.Predicate;
import java.util.function.Supplier;
-import java.util.stream.Collectors;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationRegistry;
@@ -122,7 +121,7 @@ private static List<Defau... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceWebHandler.java | @@ -27,7 +27,6 @@
import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -359,7 +358,7 @@ private void resolveResourceLocations() {
}
if (isOptimizeLocations()) {
- ... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java | @@ -300,7 +300,7 @@ public List<Set<NameValueExpression<String>>> getParamConditions() {
return this.partialMatches.stream()
.filter(PartialMatch::hasProducesMatch)
.map(match -> match.getInfo().getParamsCondition().getExpressions())
- .collect(Collectors.toList());
+ .toList();
}
/** | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/SyncInvocableHandlerMethod.java | @@ -20,7 +20,6 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
-import java.util.stream.Collectors;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.core.ParameterNameDiscoverer;
@@ -69,7 +68,7 @@ p... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver.java | @@ -24,7 +24,6 @@
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -133,9 +132,9 @@ private List<SyncHandlerMethodArgumentResolver> initBinderReso... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ModelInitializer.java | @@ -21,7 +21,6 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import java.util.stream.Collectors;
import reactor.core.publisher.Mono;
@@ -112,7 +111,7 @@ private Mono<Void> invokeModelAttributeMethods(BindingContext bindingContext,
.zip(resultList, objectArray ->
Arrays.... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandler.java | @@ -23,7 +23,6 @@
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
-import java.util.stream.Collectors;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -357,7 +356,7 @@ private Mono<? extends Void> renderWith(View view, Map<String, Object> model,
private List... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/PatternsRequestConditionTests.java | @@ -18,7 +18,6 @@
import java.util.Arrays;
import java.util.Iterator;
-import java.util.stream.Collectors;
import org.junit.jupiter.api.Test;
@@ -210,7 +209,7 @@ private PatternsRequestCondition createPatternsCondition(String... patterns) {
return new PatternsRequestCondition(Arrays
.stream(patterns)
... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelInitializerTests.java | @@ -21,7 +21,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.stream.Collectors;
import io.reactivex.rxjava3.core.Single;
import org.junit.jupiter.api.BeforeEach;
@@ -208,7 +207,7 @@ private InitBinderBindingContext getBindingContext(Object controller) {
Meth... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistry.java | @@ -19,7 +19,6 @@
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
-import java.util.stream.Collectors;
import org.springframework.core.OrderComparator;
import org.springframework.core.Ordered;
@@ -71,7 +70,7 @@ protected List<Object> getInterceptors() {
return this.registration... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultEntityResponseBuilder.java | @@ -28,7 +28,6 @@
import java.util.concurrent.CompletionException;
import java.util.concurrent.CompletionStage;
import java.util.function.Consumer;
-import java.util.stream.Collectors;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.Cookie;
@@ -336,7 +335,7 @@ private static List<MediaType> ... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java | @@ -25,7 +25,6 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.stream.Collectors;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
@@ -490,7 +489,7 @@ private void resolveResourceLocations() {
result.addAll(this.locationResou... | true |
Other | spring-projects | spring-framework | 0ccb64fe10023ffa7079b9eea6156656d7cd7f24.json | Replace Collectors.toList with Stream.toList
Closes gh-29203 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java | @@ -26,7 +26,6 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
-import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -413,7 +412,7 @@ private static List<String> getUndelive... | true |
Other | spring-projects | spring-framework | 124a76b1adea7d43efbbf53f01cd330e6dceb728.json | Improve resolution of generic type variables
See gh-23418 | spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java | @@ -199,25 +199,31 @@ else if (genericType instanceof ParameterizedType parameterizedType) {
private static ResolvableType resolveVariable(TypeVariable<?> typeVariable, ResolvableType contextType) {
ResolvableType resolvedType;
if (contextType.hasGenerics()) {
- resolvedType = ResolvableType.forType(typeVaria... | true |
Other | spring-projects | spring-framework | 124a76b1adea7d43efbbf53f01cd330e6dceb728.json | Improve resolution of generic type variables
See gh-23418 | spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java | @@ -173,6 +173,19 @@ void resolveIncompleteTypeVariables() {
assertThat(resolved[1]).isEqualTo(Long.class);
}
+ @Test
+ public void resolvePartiallySpecializedTypeVariables() {
+ Type resolved = resolveType(BiGenericClass.class.getTypeParameters()[0], TypeFixedBiGenericClass.class);
+ assertThat(resolved).isNo... | true |
Other | spring-projects | spring-framework | 9a180d1811866b2abe8c2888cf7a3439d965c800.json | Add JMH benchmarks
Closes gh-24104 | spring-beans/src/jmh/java/org/springframework/beans/BeanUtilsBenchmark.java | @@ -0,0 +1,66 @@
+/*
+ * Copyright 2002-2022 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.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | 9a180d1811866b2abe8c2888cf7a3439d965c800.json | Add JMH benchmarks
Closes gh-24104 | spring-beans/src/jmh/kotlin/org/springframework/beans/KotlinBeanUtilsBenchmark.kt | @@ -0,0 +1,51 @@
+/*
+ * Copyright 2002-2022 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.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | 8e73b573293cc46eeffff6fc33fccc677b5ebc31.json | Refine Kotlin changes
This refinement ensures the constructor is properly
accessible, avoid duplicating current logic and
provide a slightly faster implementation of the
Kotlin codepath.
See gh-24104 | spring-beans/src/main/java/org/springframework/beans/BeanUtils.java | @@ -51,7 +51,6 @@
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ConcurrentReferenceHashMap;
-import org.springframework.util.ObjectUtils;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
@@... | false |
Other | spring-projects | spring-framework | edcc559b4aabfb71a83a6cb076d5f2f4154b7277.json | Add fast-path in BeanUtils#instantiateClass
For no-args constructor.
See gh-24104 | spring-beans/src/main/java/org/springframework/beans/BeanUtils.java | @@ -51,6 +51,7 @@
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ConcurrentReferenceHashMap;
+import org.springframework.util.ObjectUtils;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
@@... | false |
Other | spring-projects | spring-framework | 42ab1b75e747706b3ddc175ab6ca27276901b5ee.json | Fix a regression in Kotlin serialization support
After gh-29068, some Type instances can throw an
IllegalArgumentException. This commit catches them
properly to just return a null serializer in that
case.
Closes gh-29192 | spring-web/src/main/java/org/springframework/http/codec/json/KotlinSerializationJsonDecoder.java | @@ -133,7 +133,11 @@ public Mono<Object> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableTy
private KSerializer<Object> serializer(Type type) {
KSerializer<Object> serializer = serializerCache.get(type);
if (serializer == null) {
- serializer = SerializersKt.serializerOrNull(type);
+ try {
+ se... | true |
Other | spring-projects | spring-framework | 42ab1b75e747706b3ddc175ab6ca27276901b5ee.json | Fix a regression in Kotlin serialization support
After gh-29068, some Type instances can throw an
IllegalArgumentException. This commit catches them
properly to just return a null serializer in that
case.
Closes gh-29192 | spring-web/src/main/java/org/springframework/http/codec/json/KotlinSerializationJsonEncoder.java | @@ -121,7 +121,11 @@ public DataBuffer encodeValue(Object value, DataBufferFactory bufferFactory,
private KSerializer<Object> serializer(Type type) {
KSerializer<Object> serializer = serializerCache.get(type);
if (serializer == null) {
- serializer = SerializersKt.serializerOrNull(type);
+ try {
+ serial... | true |
Other | spring-projects | spring-framework | 42ab1b75e747706b3ddc175ab6ca27276901b5ee.json | Fix a regression in Kotlin serialization support
After gh-29068, some Type instances can throw an
IllegalArgumentException. This commit catches them
properly to just return a null serializer in that
case.
Closes gh-29192 | spring-web/src/main/java/org/springframework/http/converter/json/KotlinSerializationJsonHttpMessageConverter.java | @@ -173,7 +173,11 @@ private Charset getCharsetToUse(@Nullable MediaType contentType) {
private KSerializer<Object> serializer(Type type) {
KSerializer<Object> serializer = serializerCache.get(type);
if (serializer == null) {
- serializer = SerializersKt.serializerOrNull(type);
+ try {
+ serializer = Ser... | true |
Other | spring-projects | spring-framework | 42ab1b75e747706b3ddc175ab6ca27276901b5ee.json | Fix a regression in Kotlin serialization support
After gh-29068, some Type instances can throw an
IllegalArgumentException. This commit catches them
properly to just return a null serializer in that
case.
Closes gh-29192 | spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonDecoderTests.kt | @@ -61,6 +61,7 @@ class KotlinSerializationJsonDecoderTests : AbstractDecoderTests<KotlinSerializa
Assertions.assertThat(decoder.canDecode(ResolvableType.forClassWithGenerics(ArrayList::class.java, Int::class.java), MediaType.APPLICATION_JSON)).isTrue()
Assertions.assertThat(decoder.canDecode(ResolvableType.forCl... | true |
Other | spring-projects | spring-framework | 42ab1b75e747706b3ddc175ab6ca27276901b5ee.json | Fix a regression in Kotlin serialization support
After gh-29068, some Type instances can throw an
IllegalArgumentException. This commit catches them
properly to just return a null serializer in that
case.
Closes gh-29192 | spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonEncoderTests.kt | @@ -56,6 +56,7 @@ class KotlinSerializationJsonEncoderTests : AbstractEncoderTests<KotlinSerializa
Assertions.assertThat(encoder.canEncode(ResolvableType.forClassWithGenerics(List::class.java, Pojo::class.java), MediaType.APPLICATION_JSON)).isTrue()
Assertions.assertThat(encoder.canEncode(ResolvableType.forClassW... | true |
Other | spring-projects | spring-framework | 42ab1b75e747706b3ddc175ab6ca27276901b5ee.json | Fix a regression in Kotlin serialization support
After gh-29068, some Type instances can throw an
IllegalArgumentException. This commit catches them
properly to just return a null serializer in that
case.
Closes gh-29192 | spring-web/src/test/kotlin/org/springframework/http/converter/json/KotlinSerializationJsonHttpMessageConverterTests.kt | @@ -21,6 +21,7 @@ import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.jupiter.api.Test
import org.springframework.core.Ordered
+import org.springframework.core.ResolvableType
import org.springframework.http.MediaType
import org.springf... | true |
Other | spring-projects | spring-framework | 94e5eb3eb66edd80644b49689bf4100b48bae10b.json | Consider empty jar entries as readable
Prior to this commit, resource handling would not serve empty files and
return instead HTTP 404 responses. This would only happen for files
contained by JARs, but not on the filesystem.
This can be tracked to changes done in `AbstractFileResolvingResource`
where we avoid serving... | spring-core/src/main/java/org/springframework/core/io/AbstractFileResolvingResource.java | @@ -20,13 +20,15 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.HttpURLConnection;
+import java.net.JarURLConnection;
import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.nio.channels.FileChannel;
import java.nio.channels.ReadableByteChannel;... | true |
Other | spring-projects | spring-framework | 94e5eb3eb66edd80644b49689bf4100b48bae10b.json | Consider empty jar entries as readable
Prior to this commit, resource handling would not serve empty files and
return instead HTTP 404 responses. This would only happen for files
contained by JARs, but not on the filesystem.
This can be tracked to changes done in `AbstractFileResolvingResource`
where we avoid serving... | spring-core/src/test/java/org/springframework/core/io/ClassPathResourceTests.java | @@ -16,10 +16,18 @@
package org.springframework.core.io;
+import java.io.File;
import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
impor... | true |
Other | spring-projects | spring-framework | 874a296a76d8c301bc38399a7158220e367dc8dc.json | Avoid resizing of Maps created by CollectionUtils
See gh-29190 | spring-core/src/main/java/org/springframework/util/CollectionUtils.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -85,7 +85,8 @@ public static boolean isEmpty... | false |
Other | spring-projects | spring-framework | ddef70935a80df7511319915e4144bad4f505e3a.json | Fix MockMvc sample setup
See gh-29201 | src/docs/asciidoc/testing.adoc | @@ -7052,7 +7052,7 @@ To set up MockMvc through Spring configuration, use the following:
@BeforeEach
void setup(WebApplicationContext wac) {
- this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+ this.mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
}
// ... | false |
Other | spring-projects | spring-framework | 23a58e6bab2b5aecd77e30c2b2d0ee41b643876f.json | Skip ModuleFinder#ofSystem usage on native
gh-28506 introduces a big footprint regression on
native, so it should for now be skipped when
compiling to native images. Such support could
potentially be re-introduced via gh-29081.
Closes gh-29183 | spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java | @@ -48,6 +48,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.springframework.core.NativeDetector;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
@@ ... | false |
Other | spring-projects | spring-framework | 4625e92eb86899f83513a9202d090b137a04f0e8.json | Break dependency between TestCompiler and AOT
This commit improves `TestCompiler` with a `with` function that allows
to customize a test compiler instance. Rather than `TestCompiler`
knowing about `TestGenerationContext`, the latter implements the
function so that it can be passed as is.
See gh-29175 | spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyBeanRegistrationAotProcessorTests.java | @@ -151,7 +151,7 @@ private void compile(BiConsumer<DefaultListableBeanFactory, Compiled> result) {
.build());
});
this.generationContext.writeGeneratedContent();
- TestCompiler.forSystem().withFiles(this.generationContext.getGeneratedFiles()).compile(compiled -> {
+ TestCompiler.forSystem().with(this.gen... | true |
Other | spring-projects | spring-framework | 4625e92eb86899f83513a9202d090b137a04f0e8.json | Break dependency between TestCompiler and AOT
This commit improves `TestCompiler` with a `with` function that allows
to customize a test compiler instance. Rather than `TestCompiler`
knowing about `TestGenerationContext`, the latter implements the
function so that it can be passed as is.
See gh-29175 | spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanRegistrationAotContributionTests.java | @@ -176,7 +176,7 @@ private void compile(RegisteredBean registeredBean,
});
this.generationContext.writeGeneratedContent();
- TestCompiler.forSystem().withFiles(this.generationContext.getGeneratedFiles()).compile(compiled ->
+ TestCompiler.forSystem().with(this.generationContext).compile(compiled ->
resu... | true |
Other | spring-projects | spring-framework | 4625e92eb86899f83513a9202d090b137a04f0e8.json | Break dependency between TestCompiler and AOT
This commit improves `TestCompiler` with a `with` function that allows
to customize a test compiler instance. Rather than `TestCompiler`
knowing about `TestGenerationContext`, the latter implements the
function so that it can be passed as is.
See gh-29175 | spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionMethodGeneratorTests.java | @@ -425,7 +425,7 @@ private void compile(MethodReference method,
.addCode("return $L;", methodInvocation).build());
});
this.generationContext.writeGeneratedContent();
- TestCompiler.forSystem().withFiles(this.generationContext.getGeneratedFiles()).compile(compiled ->
+ TestCompiler.forSystem().with(this.... | true |
Other | spring-projects | spring-framework | 4625e92eb86899f83513a9202d090b137a04f0e8.json | Break dependency between TestCompiler and AOT
This commit improves `TestCompiler` with a `with` function that allows
to customize a test compiler instance. Rather than `TestCompiler`
knowing about `TestGenerationContext`, the latter implements the
function so that it can be passed as is.
See gh-29175 | spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGeneratorTests.java | @@ -429,7 +429,7 @@ private void compile(
.addStatement("return beanDefinition").build());
});
this.generationContext.writeGeneratedContent();
- TestCompiler.forSystem().withFiles(this.generationContext.getGeneratedFiles()).compile(compiled -> {
+ TestCompiler.forSystem().with(this.generationContext).comp... | true |
Other | spring-projects | spring-framework | 4625e92eb86899f83513a9202d090b137a04f0e8.json | Break dependency between TestCompiler and AOT
This commit improves `TestCompiler` with a `with` function that allows
to customize a test compiler instance. Rather than `TestCompiler`
knowing about `TestGenerationContext`, the latter implements the
function so that it can be passed as is.
See gh-29175 | spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGeneratorTests.java | @@ -76,7 +76,7 @@ private void compile(Object value, BiConsumer<Object, Compiled> result) {
.returns(Object.class).addStatement("return $L", generatedCode).build());
});
generationContext.writeGeneratedContent();
- TestCompiler.forSystem().withFiles(generationContext.getGeneratedFiles()).compile(compiled -... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.