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 | 4e5c780b9917efcff63d8c7dff482700c18dd3db.json | Move TestSourcesPlugin to a Java Gradle plugin
This commit moves the existing "test sources" Gradle plugin from Groovy
to Java and updates the "buildSrc" build file to prepare for additional
plugins in the Spring Framework build.
The plugin itself looks, for a given Spring Framework module, at all the
project depende... | buildSrc/src/main/resources/META-INF/gradle-plugins/test-source-set-dependencies.properties | @@ -1 +0,0 @@
-implementation-class=org.springframework.build.gradle.TestSourceSetDependenciesPlugin | true |
Other | spring-projects | spring-framework | 4e5c780b9917efcff63d8c7dff482700c18dd3db.json | Move TestSourcesPlugin to a Java Gradle plugin
This commit moves the existing "test sources" Gradle plugin from Groovy
to Java and updates the "buildSrc" build file to prepare for additional
plugins in the Spring Framework build.
The plugin itself looks, for a given Spring Framework module, at all the
project depende... | settings.gradle | @@ -22,10 +22,6 @@ include "spring-webflux"
include "spring-websocket"
include "spring-framework-bom"
-// Exposes gradle buildSrc for IDE support
-include "buildSrc"
-rootProject.children.find{ it.name == "buildSrc" }.name = "spring-build-src"
-
rootProject.name = "spring"
rootProject.children.each {project ->
... | true |
Other | spring-projects | spring-framework | 91c0fbaadbb5e17f1f44261f3ae641fbad9aae22.json | Use valid example in Javadoc for @EnableWebFlux
This commit modifies the class-level Javadoc for the @EnableWebFlux
annotation to reference an actual method in WebFluxConfigurer.
Closes gh-23457 | spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java | @@ -47,10 +47,17 @@
* @EnableWebFlux
* @ComponentScan(basePackageClasses = MyConfiguration.class)
* public class MyConfiguration implements WebFluxConfigurer {
+ *
+ * private ObjectMapper objectMapper;
*
* @Override
- * public void configureMessageWriters(List<HttpMessageWriter... | false |
Other | spring-projects | spring-framework | f3c7879831e33152d7143fccf626dfc646724c79.json | Add missing css file
See gh-21778 | src/docs/asciidoc/css/stylesheet.css | @@ -0,0 +1,27 @@
+@import 'css/spring.css';
+
+.listingblock .switch {
+ border-width: 1px 1px 0 1px;
+ border-style: solid;
+ border-color: #282c34;
+ display: inline-block;
+}
+
+.listingblock .switch--item {
+ padding: 10px;
+ background-color: #e6e1dc;
+ color: #282c34;
+ display: inline-blo... | false |
Other | spring-projects | spring-framework | ee47bc3a25cb1c38d0666a685a8a6b4255daa325.json | Fix typo in data access reference documentation
Closes gh-23450 | src/docs/asciidoc/data-access.adoc | @@ -5737,7 +5737,7 @@ generic or customized to various platforms (such as Tomcat, JBoss and WebSphere)
As described in <<core.adoc#aop-aj-ltw-spring, Spring configuration>>, you can configure
a context-wide `LoadTimeWeaver` by using the `@EnableLoadTimeWeaving` annotation of the
-`context:load-time-weaver` XML elem... | false |
Other | spring-projects | spring-framework | a532afb15d298f2114d6072f0d29138c89bda04f.json | Use System.nanoTime() in StopWatch
Prior to this commit, StopWatch used System.currentTimeMillis() to
track and report running time in milliseconds.
This commit updates the internals of StopWatch to use System.nanoTime()
instead of System.currentTimeMillis(). Consequently, running time is
now tracked and reported in ... | spring-core/src/main/java/org/springframework/util/StopWatch.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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,21 +19,25 @@
import java.text.NumberFor... | true |
Other | spring-projects | spring-framework | a532afb15d298f2114d6072f0d29138c89bda04f.json | Use System.nanoTime() in StopWatch
Prior to this commit, StopWatch used System.currentTimeMillis() to
track and report running time in milliseconds.
This commit updates the internals of StopWatch to use System.nanoTime()
instead of System.currentTimeMillis(). Consequently, running time is
now tracked and reported in ... | spring-core/src/test/java/org/springframework/util/StopWatchTests.java | @@ -16,6 +16,8 @@
package org.springframework.util;
+import java.util.concurrent.TimeUnit;
+
import org.junit.Test;
import org.springframework.util.StopWatch.TaskInfo;
@@ -39,8 +41,8 @@ public class StopWatchTests {
private static final String name2 = "Task 2";
private static final long duration1 = 200;
... | true |
Other | spring-projects | spring-framework | 50e53343789fe985b09e9be83481005074f716ee.json | Simplify assertions within MockMvc internals | spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java | @@ -31,6 +31,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.springframework.test.util.AssertionErrors.assertEquals;
+import static org.springframework.test.util.AssertionErrors.assertNotNull;
import static org.springframework.test.util.AssertionErrors.assertTrue;
/**
@@ -77,10 +78,8... | true |
Other | spring-projects | spring-framework | 50e53343789fe985b09e9be83481005074f716ee.json | Simplify assertions within MockMvc internals | spring-test/src/main/java/org/springframework/test/web/servlet/result/CookieResultMatchers.java | @@ -20,12 +20,12 @@
import org.hamcrest.Matcher;
-import org.springframework.test.util.AssertionErrors;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.ResultMatcher;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.springframework.test... | true |
Other | spring-projects | spring-framework | 50e53343789fe985b09e9be83481005074f716ee.json | Simplify assertions within MockMvc internals | spring-test/src/main/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchers.java | @@ -22,7 +22,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.springframework.test.util.AssertionErrors.assertEquals;
-import static org.springframework.test.util.AssertionErrors.assertTrue;
+import static org.springframework.test.util.AssertionErrors.assertNotNull;
/**
* Factory for... | true |
Other | spring-projects | spring-framework | 50e53343789fe985b09e9be83481005074f716ee.json | Simplify assertions within MockMvc internals | spring-test/src/main/java/org/springframework/test/web/servlet/result/HandlerResultMatchers.java | @@ -31,6 +31,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.springframework.test.util.AssertionErrors.assertEquals;
+import static org.springframework.test.util.AssertionErrors.assertNotNull;
import static org.springframework.test.util.AssertionErrors.assertTrue;
import static org.spr... | true |
Other | spring-projects | spring-framework | 50e53343789fe985b09e9be83481005074f716ee.json | Simplify assertions within MockMvc internals | spring-test/src/main/java/org/springframework/test/web/servlet/result/ModelResultMatchers.java | @@ -28,8 +28,8 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.springframework.test.util.AssertionErrors.assertEquals;
+import static org.springframework.test.util.AssertionErrors.assertNotNull;
import static org.springframework.test.util.AssertionErrors.assertTrue;
-import static org.spr... | true |
Other | spring-projects | spring-framework | a43ba052e94eb3b07ec9e407500e713d24e02b16.json | Remove unnecessary loop in SerializableTypeWrapper
Since arbitrary levels of proxies do not occur, this commit replaces
the `while` loop in SerializableTypeWrapper.unwrap() with a simple
`if` statement.
Closes gh-23415 | spring-core/src/main/java/org/springframework/core/SerializableTypeWrapper.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -51,6 +51,7 @@
*
* @author Phillip Webb
... | true |
Other | spring-projects | spring-framework | a43ba052e94eb3b07ec9e407500e713d24e02b16.json | Remove unnecessary loop in SerializableTypeWrapper
Since arbitrary levels of proxies do not occur, this commit replaces
the `while` loop in SerializableTypeWrapper.unwrap() with a simple
`if` statement.
Closes gh-23415 | spring-core/src/test/java/org/springframework/core/SerializableTypeWrapperTests.java | @@ -33,8 +33,6 @@
import static org.assertj.core.api.Assertions.assertThat;
-
-
/**
* Tests for {@link SerializableTypeWrapper}.
* | true |
Other | spring-projects | spring-framework | 03dd45fbd62bdc158bf31098fd54cf5de3da2026.json | Use AssertJ in AnnotationAttributesTests | spring-core/src/test/java/org/springframework/core/annotation/AnnotationAttributesTests.java | @@ -74,17 +74,19 @@ public void typeSafeAttributeAccess() {
@Test
public void unresolvableClassWithClassNotFoundException() throws Exception {
attributes.put("unresolvableClass", new ClassNotFoundException("myclass"));
- assertThatIllegalArgumentException().isThrownBy(() ->
- attributes.getClass("unresolvabl... | false |
Other | spring-projects | spring-framework | ee2041388b6adcf3a6727415be78a90774ed4113.json | Fix typo in Javadoc for MergedAnnotations | spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotations.java | @@ -111,7 +111,7 @@
* mergedAnnotations.get(ExampleAnnotation.class).getString("value");
*
* // get all meta-annotations but no directly present annotations
- * mergedAnnotations.stream().anyMatch(MergedAnnotation::isMetaPresent);
+ * mergedAnnotations.stream().filter(MergedAnnotation::isMetaPresent);
*
* // ... | false |
Other | spring-projects | spring-framework | 765d43b34f85c176a2e557d1e3f8ecaa0cd3d4c7.json | Upgrade rsocket-core to 1.0.0-RC2
Closes gh-23359 | build.gradle | @@ -41,7 +41,7 @@ ext {
log4jVersion = "2.12.0"
nettyVersion = "4.1.38.Final"
reactorVersion = "Dysprosium-M3"
- rsocketVersion = "0.12.2-RC4"
+ rsocketVersion = "1.0.0-RC2"
rxjavaVersion = "1.3.8"
rxjavaAdapterVersion = "1.2.1"
rxjava2Version = "2.2.10" | false |
Other | spring-projects | spring-framework | b67dbe66ef43e6faca7886a36ebc6f9e9a1fd8f4.json | Revise use of ResolvableType in MethodParameter
Includes consistent use of getContainingClass() | spring-core/src/main/java/org/springframework/core/MethodParameter.java | @@ -160,9 +160,7 @@ public MethodParameter(Constructor<?> constructor, int parameterIndex, int nesti
* @param containingClass the containing class
* @since 5.2
*/
- MethodParameter(Executable executable, int parameterIndex,
- @Nullable Class<?> containingClass) {
-
+ MethodParameter(Executable executable, in... | true |
Other | spring-projects | spring-framework | b67dbe66ef43e6faca7886a36ebc6f9e9a1fd8f4.json | Revise use of ResolvableType in MethodParameter
Includes consistent use of getContainingClass() | spring-core/src/main/java/org/springframework/core/ResolvableType.java | @@ -1300,10 +1300,7 @@ public static ResolvableType forMethodParameter(MethodParameter methodParameter,
*/
public static ResolvableType forMethodParameter(MethodParameter methodParameter, @Nullable Type targetType) {
Assert.notNull(methodParameter, "MethodParameter must not be null");
- int nestingLevel = meth... | true |
Other | spring-projects | spring-framework | 59aee923e45e91ae336354f30d20478b8fc3f8ad.json | Add filter to AbstractCachingViewResolver
This commit introduces a filter that specifies whether a View should be
cached by the AbstractCachingViewResolver or not.
Closes gh-22391 | spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java | @@ -68,6 +68,9 @@ public void render(@Nullable Map<String, ?> model, HttpServletRequest request, H
/** Fast access cache for Views, returning already cached instances without a global lock. */
private final Map<Object, View> viewAccessCache = new ConcurrentHashMap<>(DEFAULT_CACHE_LIMIT);
+ /** Filter function whi... | true |
Other | spring-projects | spring-framework | 59aee923e45e91ae336354f30d20478b8fc3f8ad.json | Add filter to AbstractCachingViewResolver
This commit introduces a filter that specifies whether a View should be
cached by the AbstractCachingViewResolver or not.
Closes gh-22391 | spring-webmvc/src/main/java/org/springframework/web/servlet/view/ViewCacheFilter.java | @@ -0,0 +1,32 @@
+/*
+ * Copyright 2002-2018 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ ... | true |
Other | spring-projects | spring-framework | 59aee923e45e91ae336354f30d20478b8fc3f8ad.json | Add filter to AbstractCachingViewResolver
This commit introduces a filter that specifies whether a View should be
cached by the AbstractCachingViewResolver or not.
Closes gh-22391 | spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverCacheFilterTest.java | @@ -0,0 +1,86 @@
+/*
+ * Copyright 2002-2018 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ ... | true |
Other | spring-projects | spring-framework | 49873a30c5eeddc787bdc4b825995e2fe97ce99b.json | Simplify String concatenation | spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java | @@ -544,9 +544,7 @@ public int hashCode() {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("AspectJExpressionPointcut: ");
- sb.append("(");
+ StringBuilder sb = new StringBuilder("AspectJExpressionPointcut: (");
for (int i = 0; i < this.pointcutParameterTypes.le... | true |
Other | spring-projects | spring-framework | 49873a30c5eeddc787bdc4b825995e2fe97ce99b.json | Simplify String concatenation | spring-beans/src/main/java/org/springframework/beans/AbstractNestablePropertyAccessor.java | @@ -987,14 +987,11 @@ private int getPropertyNameKeyEnd(String propertyName, int startIndex) {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder(getClass().getName());
- if (this.wrappedObject != null) {
- sb.append(": wrapping object [").append(ObjectUtils.identityToString(this.wrap... | true |
Other | spring-projects | spring-framework | 49873a30c5eeddc787bdc4b825995e2fe97ce99b.json | Simplify String concatenation | spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java | @@ -380,11 +380,10 @@ public int hashCode() {
@Override
public String toString() {
PropertyValue[] pvs = getPropertyValues();
- StringBuilder sb = new StringBuilder("PropertyValues: length=").append(pvs.length);
if (pvs.length > 0) {
- sb.append("; ").append(StringUtils.arrayToDelimitedString(pvs, "; "));
... | true |
Other | spring-projects | spring-framework | 49873a30c5eeddc787bdc4b825995e2fe97ce99b.json | Simplify String concatenation | spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java | @@ -135,12 +135,10 @@ public boolean matchesName(@Nullable String candidateName) {
* @see #getAliases()
*/
public String getShortDescription() {
- StringBuilder sb = new StringBuilder();
- sb.append("Bean definition with name '").append(this.beanName).append("'");
- if (this.aliases != null) {
- sb.append(... | true |
Other | spring-projects | spring-framework | cc4593fda838103c8838a88e7893a44484b82327.json | Improve FreeMarker macro support in spring-webflux
This commit improves the FreeMarker macro support in spring-webflux by
automatically exposing a RequestContext under the name
"springMacroRequestContext" for use with Spring's FreeMarker macros in
spring.ftl.
This aligns with the user experience for FreeMarkerView in... | spring-webflux/src/main/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerView.java | @@ -21,6 +21,7 @@
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.Charset;
+import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
@@ -47,6 +48,7 @@
import org.springframework.util.Assert;
import org.springframework.util.MimeType;
i... | true |
Other | spring-projects | spring-framework | cc4593fda838103c8838a88e7893a44484b82327.json | Improve FreeMarker macro support in spring-webflux
This commit improves the FreeMarker macro support in spring-webflux by
automatically exposing a RequestContext under the name
"springMacroRequestContext" for use with Spring's FreeMarker macros in
spring.ftl.
This aligns with the user experience for FreeMarkerView in... | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java | @@ -40,7 +40,6 @@
import org.springframework.ui.ModelMap;
import org.springframework.util.FileCopyUtils;
import org.springframework.util.StringUtils;
-import org.springframework.web.context.support.StaticWebApplicationContext;
import org.springframework.web.reactive.result.view.BindStatus;
import org.springframewo... | true |
Other | spring-projects | spring-framework | cc4593fda838103c8838a88e7893a44484b82327.json | Improve FreeMarker macro support in spring-webflux
This commit improves the FreeMarker macro support in spring-webflux by
automatically exposing a RequestContext under the name
"springMacroRequestContext" for use with Spring's FreeMarker macros in
spring.ftl.
This aligns with the user experience for FreeMarkerView in... | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerViewTests.java | @@ -46,6 +46,7 @@
/**
* @author Rossen Stoyanchev
+ * @author Sam Brannen
*/
public class FreeMarkerViewTests {
@@ -56,14 +57,13 @@ public class FreeMarkerViewTests {
private final MockServerWebExchange exchange =
MockServerWebExchange.from(MockServerHttpRequest.get("/path"));
- private GenericApplica... | true |
Other | spring-projects | spring-framework | b21b27c5acffff1051ffb5b7114823f4121f78ae.json | Add MultiValueMap.addIfAbsent method
Closes gh-23111 | spring-core/src/main/java/org/springframework/util/MultiValueMap.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -61,6 +61,19 @@
*/
void addAll(MultiVal... | true |
Other | spring-projects | spring-framework | b21b27c5acffff1051ffb5b7114823f4121f78ae.json | Add MultiValueMap.addIfAbsent method
Closes gh-23111 | spring-core/src/test/java/org/springframework/util/LinkedMultiValueMapTests.java | @@ -47,6 +47,19 @@ public void add() {
assertThat(map.get("key")).isEqualTo(expected);
}
+ @Test
+ public void addIfAbsentWhenAbsent() {
+ map.addIfAbsent("key", "value1");
+ assertThat(map.get("key")).containsExactly("value1");
+ }
+
+ @Test
+ public void addIfAbsentWhenPresent() {
+ map.add("key", "value1")... | true |
Other | spring-projects | spring-framework | 74fcb0c5e84889540c528ee67251df6a8393a238.json | Add proper @Value documentation
Closes gh-23052 | src/docs/asciidoc/core/core-beans.adoc | @@ -5243,6 +5243,199 @@ named "customerPreferenceDao" and then falls back to a primary type match for th
`ApplicationContext`.
+[[beans-value-annotations]]
+=== Using `@Value`
+
+You can use `@Value` annotation to inject a default value to a constructor parameter, as the following example shows:
+
+[source,java,in... | false |
Other | spring-projects | spring-framework | 30d68f2de78ef70ebcb02c2d40c85587f384f618.json | Reject user names with "%2F" in STOMP
Closes gh-23836 | spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessagingTemplate.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -224,6 +224,7 @@ public void convertAndSendT... | true |
Other | spring-projects | spring-framework | 30d68f2de78ef70ebcb02c2d40c85587f384f618.json | Reject user names with "%2F" in STOMP
Closes gh-23836 | spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -203,6 +203,7 @@ private ParseResult parseSu... | true |
Other | spring-projects | spring-framework | 30d68f2de78ef70ebcb02c2d40c85587f384f618.json | Reject user names with "%2F" in STOMP
Closes gh-23836 | spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessagingTemplateTests.java | @@ -36,6 +36,7 @@
import org.springframework.util.LinkedMultiValueMap;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Unit tests for {@link org.springframework.messaging.simp.SimpMessagingTemplate}.
@@ -86,6 +87... | true |
Other | spring-projects | spring-framework | 30d68f2de78ef70ebcb02c2d40c85587f384f618.json | Reject user names with "%2F" in STOMP
Closes gh-23836 | spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java | @@ -29,6 +29,7 @@
import org.springframework.util.StringUtils;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
@@ -113,6 +114,15 @@ pub... | true |
Other | spring-projects | spring-framework | db97dac86dd1b3023d87e6093ae0bcecdf4afd78.json | Improve readability of CONTRIBUTING.md
Closes gh-24068 | CONTRIBUTING.md | @@ -28,10 +28,11 @@ If you have a question, check Stack Overflow using
[this list of tags](https://spring.io/questions), organized by Spring project.
Find an existing discussion, or start a new one if necessary.
-If you suspect an issue, perform a search in the
+If you find an issue, perform a search in the
[GitHu... | false |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapter.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -71,7 +71,7 @@ public void onWebSocketConnec... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapter.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -103,7 +103,7 @@ public void onMessage(javax... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecorator.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -47,7 +47,7 @@ public void afterConnectionEs... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/server/support/AbstractHandshakeHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -157,7 +157,7 @@ else if (websphereWsPresent... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/server/support/HandshakeInterceptorChain.java | @@ -77,7 +77,7 @@ public void applyAfterHandshake(
try {
interceptor.afterHandshake(request, response, this.wsHandler, failure);
}
- catch (Throwable ex) {
+ catch (Exception ex) {
if (logger.isWarnEnabled()) {
logger.warn(interceptor + " threw exception in afterHandshake: " + ex);
} | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/server/support/WebSocketHttpRequestHandler.java | @@ -171,7 +171,7 @@ public void handleRequest(HttpServletRequest servletRequest, HttpServletResponse
catch (HandshakeFailureException ex) {
failure = ex;
}
- catch (Throwable ex) {
+ catch (Exception ex) {
failure = new HandshakeFailureException("Uncaught failure for request " + request.getURI(), ex);
... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -244,7 +244,7 @@ private void handleOpenFram... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransport.java | @@ -118,7 +118,7 @@ protected void connectInternal(final TransportRequest transportRequest, final We
getRestTemplate().execute(receiveUrl, HttpMethod.POST, requestCallback, responseExtractor);
requestCallback = requestCallbackAfterHandshake;
}
- catch (Throwable ex) {
+ catch (Exception ex) {
... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -260,7 +260,7 @@ public final ListenableFutu... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -133,7 +133,7 @@ public void handleRequest(H... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -215,10 +215,10 @@ protected void handleRawW... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractHttpReceivingTransportHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -72,7 +72,7 @@ protected void handleRequestI... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/WebSocketTransportHandler.java | @@ -124,7 +124,7 @@ public void handleRequest(ServerHttpRequest request, ServerHttpResponse response
wsHandler = new SockJsWebSocketHandler(getServiceConfig(), wsHandler, sockJsSession);
this.handshakeHandler.doHandshake(request, response, wsHandler, sockJsSession.getAttributes());
}
- catch (Throwable ex) ... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java | @@ -324,7 +324,7 @@ protected void writeFrame(SockJsFrame frame) throws SockJsTransportFailureExcept
try {
writeFrameInternal(frame);
}
- catch (Throwable ex) {
+ catch (Exception ex) {
logWriteFrameFailure(ex);
try {
// Force disconnect (so we won't try to send close frame)
@@ -388,7 +388,7 @@... | true |
Other | spring-projects | spring-framework | 526d89e1e61807faffdb3686e4243ffa4c2831f0.json | Refine Throwable handling in spring-websocket
This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075 | spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSession.java | @@ -166,7 +166,7 @@ public void initializeDelegateSession(WebSocketSession session) {
scheduleHeartbeat();
this.openFrameSent = true;
}
- catch (Throwable ex) {
+ catch (Exception ex) {
tryCloseWithSockJsTransportError(ex, CloseStatus.SERVER_ERROR);
}
}
@@ -186,7 +186,7 @@ public void hand... | true |
Other | spring-projects | spring-framework | ddb38eefeea1506bbf5bdefda4fd0c354381d79f.json | Expose method to determine form content type
This commit exposes the method that returns the media type used to write
forms. By default, it includes the charset in the content type, which
can cause issues with certain consumers. This commit changes the method
from a private to a protected method, so that users can ove... | spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java | @@ -384,7 +384,7 @@ private boolean isMultipart(MultiValueMap<String, ?> map, @Nullable MediaType co
private void writeForm(MultiValueMap<String, Object> formData, @Nullable MediaType contentType,
HttpOutputMessage outputMessage) throws IOException {
- contentType = getMediaType(contentType);
+ contentType = ... | false |
Other | spring-projects | spring-framework | 5f3c7ca559ac5f7d4d37917d568001579b596f2b.json | Fix NullPointerException in Jackson2SmileDecoder
Fix uncommon case in Jackson2SmileDecoder, where a null token,
incicating a document separator in streaming mode, is followed by
NOT_AVAILABLE.
Closes gh-24009 | spring-web/src/main/java/org/springframework/http/codec/json/Jackson2Tokenizer.java | @@ -122,13 +122,18 @@ private Flux<TokenBuffer> endOfInput() {
private List<TokenBuffer> parseTokenBufferFlux() throws IOException {
List<TokenBuffer> result = new ArrayList<>();
- while (true) {
+ // SPR-16151: Smile data format uses null to separate documents
+ boolean previousNull = false;
+ while (!this.... | false |
Other | spring-projects | spring-framework | 7bed4f36da61ee6d729bbd59639d5be183655700.json | Add missing verify() in Jackson2TokenizerTests
Closes gh-24056 | spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java | @@ -210,8 +210,8 @@ public void testLimit() {
.expectNext(expected)
.verifyComplete();
- StepVerifier.create(decode(source, false, maxInMemorySize - 1))
- .expectError(DataBufferLimitException.class);
+ StepVerifier.create(decode(source, false, maxInMemorySize - 2))
+ .verifyError(DataBufferLimitExc... | false |
Other | spring-projects | spring-framework | 21b2fc1f0129420a8da521cd1e7f33f19beffbc1.json | Improve HttpHandlerConnection completion
Before this commit the connector waited for a completed response (via
ServerHttpResponse#setComplete or ServerHttpResponse#writeWith) or an
error signal in handling, but it didn't deal explicitly with the case
where both can occur.
This commit explicitly waits for the completi... | spring-test/src/main/java/org/springframework/mock/http/client/reactive/MockClientHttpResponse.java | @@ -148,4 +148,10 @@ private Charset getCharset() {
return (charset != null ? charset : StandardCharsets.UTF_8);
}
+
+ @Override
+ public String toString() {
+ HttpStatus code = HttpStatus.resolve(this.status);
+ return (code != null ? code.name() + "(" + this.status + ")" : "Status (" + this.status + ")") + t... | true |
Other | spring-projects | spring-framework | 21b2fc1f0129420a8da521cd1e7f33f19beffbc1.json | Improve HttpHandlerConnection completion
Before this commit the connector waited for a completed response (via
ServerHttpResponse#setComplete or ServerHttpResponse#writeWith) or an
error signal in handling, but it didn't deal explicitly with the case
where both can occur.
This commit explicitly waits for the completi... | spring-test/src/main/java/org/springframework/test/web/reactive/server/HttpHandlerConnector.java | @@ -83,7 +83,9 @@ public Mono<ClientHttpResponse> connect(HttpMethod httpMethod, URI uri,
private Mono<ClientHttpResponse> doConnect(
HttpMethod httpMethod, URI uri, Function<? super ClientHttpRequest, Mono<Void>> requestCallback) {
- MonoProcessor<ClientHttpResponse> result = MonoProcessor.create();
+ MonoPr... | true |
Other | spring-projects | spring-framework | 21b2fc1f0129420a8da521cd1e7f33f19beffbc1.json | Improve HttpHandlerConnection completion
Before this commit the connector waited for a completed response (via
ServerHttpResponse#setComplete or ServerHttpResponse#writeWith) or an
error signal in handling, but it didn't deal explicitly with the case
where both can occur.
This commit explicitly waits for the completi... | spring-web/src/test/java/org/springframework/mock/http/client/reactive/test/MockClientHttpResponse.java | @@ -64,7 +64,7 @@ public MockClientHttpResponse(HttpStatus status) {
}
public MockClientHttpResponse(int status) {
- Assert.isTrue(status >= 100 && status < 600, "Status must be between 1xx and 5xx");
+ Assert.isTrue(status > 99 && status < 1000, "Status must be between 100 and 999");
this.status = status;
... | true |
Other | spring-projects | spring-framework | b5529f3f2bcf69c89a0a6a52c4f6b0034dc7f61e.json | Restore short-circuiting in equals implementation
Closes gh-24048 | spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java | @@ -1162,28 +1162,28 @@ public boolean equals(@Nullable Object other) {
}
AbstractBeanDefinition that = (AbstractBeanDefinition) other;
boolean rtn = ObjectUtils.nullSafeEquals(getBeanClassName(), that.getBeanClassName());
- rtn &= ObjectUtils.nullSafeEquals(this.scope, that.scope);
- rtn &= this.abstractFla... | false |
Other | spring-projects | spring-framework | 1f3b595a034c7c554b716ed09e3419a84d3f5fde.json | Use String.isEmpty() instead of String.equals("") | spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolver.java | @@ -56,7 +56,7 @@ protected BeanWiringInfo buildWiringInfo(Object beanInstance, Configurable annot
// Autowiring by name or by type
return new BeanWiringInfo(annotation.autowire().value(), annotation.dependencyCheck());
}
- else if (!"".equals(annotation.value())) {
+ else if (!annotation.value().isEmpty()... | true |
Other | spring-projects | spring-framework | 1f3b595a034c7c554b716ed09e3419a84d3f5fde.json | Use String.isEmpty() instead of String.equals("") | spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java | @@ -126,7 +126,7 @@ public Object lookup(String lookupName) throws NameNotFoundException {
if (logger.isDebugEnabled()) {
logger.debug("Static JNDI lookup: [" + name + "]");
}
- if ("".equals(name)) {
+ if (name.isEmpty()) {
return new SimpleNamingContext(this.root, this.boundObjects, this.environment);... | true |
Other | spring-projects | spring-framework | 1f3b595a034c7c554b716ed09e3419a84d3f5fde.json | Use String.isEmpty() instead of String.equals("") | spring-web/src/main/java/org/springframework/http/codec/ServerSentEventHttpMessageReader.java | @@ -105,7 +105,7 @@ public Flux<Object> read(
ResolvableType valueType = (shouldWrap ? elementType.getGeneric() : elementType);
return stringDecoder.decode(message.getBody(), STRING_TYPE, null, hints)
- .bufferUntil(line -> line.equals(""))
+ .bufferUntil(String::isEmpty)
.concatMap(lines -> Mono.jus... | true |
Other | spring-projects | spring-framework | 1f3b595a034c7c554b716ed09e3419a84d3f5fde.json | Use String.isEmpty() instead of String.equals("") | spring-web/src/main/java/org/springframework/http/server/DefaultPathContainer.java | @@ -97,7 +97,7 @@ public String toString() {
static PathContainer createFromUrlPath(String path, Options options) {
- if (path.equals("")) {
+ if (path.isEmpty()) {
return EMPTY_PATH;
}
char separator = options.separator();
@@ -117,7 +117,7 @@ static PathContainer createFromUrlPath(String path, Option... | true |
Other | spring-projects | spring-framework | 1f3b595a034c7c554b716ed09e3419a84d3f5fde.json | Use String.isEmpty() instead of String.equals("") | spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java | @@ -411,8 +411,8 @@ else if (!StringUtils.hasLength(pattern2string.patternString)) {
int dotPos2 = p2string.indexOf('.');
String file2 = (dotPos2 == -1 ? p2string : p2string.substring(0, dotPos2));
String secondExtension = (dotPos2 == -1 ? "" : p2string.substring(dotPos2));
- boolean firstExtensionWild = (fir... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequester.java | @@ -114,22 +114,20 @@ private DataBufferFactory bufferFactory() {
private class DefaultRequestSpec implements RequestSpec {
- private final MetadataEncoder metadataEncoder;
+ private final MetadataEncoder metadataEncoder = new MetadataEncoder(metadataMimeType(), strategies);
@Nullable
- private Mono<Paylo... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilder.java | @@ -33,6 +33,7 @@
import io.rsocket.transport.netty.client.WebsocketClientTransport;
import reactor.core.publisher.Mono;
+import org.springframework.core.ReactiveAdapter;
import org.springframework.core.ResolvableType;
import org.springframework.core.codec.Decoder;
import org.springframework.core.codec.Encoder;
... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataEncoder.java | @@ -15,8 +15,9 @@
*/
package org.springframework.messaging.rsocket;
+import java.util.ArrayList;
import java.util.Collections;
-import java.util.LinkedHashMap;
+import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -27,7 +28,9 @@
import io.rsocket.meta... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java | @@ -85,7 +85,9 @@ public interface RSocketRequester {
RequestSpec route(String route, Object... routeVars);
/**
- * Begin to specify a new request with the given metadata value.
+ * Begin to specify a new request with the given metadata value, which can
+ * be a concrete value or any producer of a single value... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultMetadataExtractorTests.java | @@ -84,7 +84,7 @@ public void compositeMetadataWithDefaultSettings() {
.metadata("html data", TEXT_HTML)
.metadata("xml data", TEXT_XML);
- DataBuffer metadata = metadataEncoder.encode();
+ DataBuffer metadata = metadataEncoder.encode().block();
Payload payload = createPayload(metadata);
Map<String,... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilderTests.java | @@ -17,6 +17,7 @@
package org.springframework.messaging.rsocket;
import java.lang.reflect.Field;
+import java.time.Duration;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -39,6 +40,7 @@
import org.springframework.core.ResolvableType;
import org.springframework.core.codec.Decoder... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterTests.java | @@ -20,6 +20,7 @@
import java.time.Duration;
import java.util.Arrays;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
@@ -28,6 +29,7 @@
import io.reactivex.Single;
import io.rsocket.AbstractRSocket;
import io.rsocket.Payload;
... | true |
Other | spring-projects | spring-framework | 996f7290cf97df2938287630ca956fe5ac35fdc8.json | Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.
Close gh-23640 | spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java | @@ -15,6 +15,7 @@
*/
package org.springframework.messaging.rsocket;
+import java.time.Duration;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
@@ -26,6 +27,7 @@
import io.rsocket.metadata.RoutingMetadata;
import io.rsocket.metadata.WellKnownMimeType;
import org.junit.jupiter.a... | true |
Other | spring-projects | spring-framework | f08cf0e86462a041a560332a45fde6ab473faccc.json | Add RSocketFrameTypeMessageCondition constants
See gh-23999 | spring-messaging/src/main/java/org/springframework/messaging/rsocket/annotation/support/RSocketFrameTypeMessageCondition.java | @@ -45,6 +45,45 @@ public class RSocketFrameTypeMessageCondition extends AbstractMessageCondition<R
public static final String FRAME_TYPE_HEADER = "rsocketFrameType";
+ /** Match connection-level frames "SETUP" or "METADATA_PUSH". */
+ public static final RSocketFrameTypeMessageCondition CONNECT_CONDITION =
+ n... | false |
Other | spring-projects | spring-framework | cd619a2f095de60638cf343220606559d8b9464a.json | Update @since tag | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestScopedControllerAdviceIntegrationTests.java | @@ -38,7 +38,7 @@
* Integration tests for request-scoped {@link ControllerAdvice @ControllerAdvice} beans.
*
* @author Sam Brannen
- * @since 5.2.2
+ * @since 5.1.12
*/
class RequestScopedControllerAdviceIntegrationTests {
| false |
Other | spring-projects | spring-framework | 9526e39f8813420f90d693c225366f80d55e0a7f.json | Fix errors in reference manual
Closes gh-24008 | src/docs/asciidoc/rsocket.adoc | @@ -485,7 +485,7 @@ Once you have a <<rsocket-requester-client,client>> or
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
.Java
----
- ViewBox box = ... ;
+ ViewBox viewBox = ... ;
Flux<AirportLocation> locations = requester.route("locate.radars.within") // <1>
.data(viewBox) // <2>
@@ -499,7 +... | true |
Other | spring-projects | spring-framework | 9526e39f8813420f90d693c225366f80d55e0a7f.json | Fix errors in reference manual
Closes gh-24008 | src/docs/asciidoc/web/webflux-functional.adoc | @@ -474,7 +474,7 @@ header:
----
RouterFunction<ServerResponse> route = RouterFunctions.route()
.GET("/hello-world", accept(MediaType.TEXT_PLAIN),
- request -> ServerResponse.ok().bodyValue("Hello World"));
+ request -> ServerResponse.ok().bodyValue("Hello World")).build();
----
[source,kotlin,indent=0,subs... | true |
Other | spring-projects | spring-framework | 9526e39f8813420f90d693c225366f80d55e0a7f.json | Fix errors in reference manual
Closes gh-24008 | src/docs/asciidoc/web/webflux.adoc | @@ -3625,7 +3625,7 @@ You can use the `@EnableWebFlux` annotation in your Java config, as the followin
----
The preceding example registers a number of Spring WebFlux
-<<mvc-webflux-special-bean-types, infrastructure beans>> and adapts to dependencies
+<<webflux-special-bean-types, infrastructure beans>> and adapts... | true |
Other | spring-projects | spring-framework | 9526e39f8813420f90d693c225366f80d55e0a7f.json | Fix errors in reference manual
Closes gh-24008 | src/docs/asciidoc/web/webmvc-functional.adoc | @@ -409,7 +409,7 @@ header:
----
RouterFunction<ServerResponse> route = RouterFunctions.route()
.GET("/hello-world", accept(MediaType.TEXT_PLAIN),
- request -> ServerResponse.ok().body("Hello World"));
+ request -> ServerResponse.ok().body("Hello World")).build();
----
[source,kotlin,indent=0,subs="verbatim... | true |
Other | spring-projects | spring-framework | 9526e39f8813420f90d693c225366f80d55e0a7f.json | Fix errors in reference manual
Closes gh-24008 | src/docs/asciidoc/web/webmvc.adoc | @@ -5317,10 +5317,10 @@ This builder customizes Jackson's default properties as follows:
It also automatically registers the following well-known modules if they are detected on the classpath:
-* https://github.com/FasterXML/jackson-datatype-jdk7[jackson-datatype-jdk7]: Support for Java 7 types, such as `java.nio.... | true |
Other | spring-projects | spring-framework | 1607f1db0bccce2d1a12102cc4a190356e8962e1.json | Fix Checkstyle nohttp violation | spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java | @@ -25,7 +25,6 @@
import com.rometools.rome.feed.rss.Channel;
import com.rometools.rome.feed.rss.Item;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.http.MediaType;
@@ -41,17 +40,9 @@
*/
public class RssChannelHttpMessageConverterTests {
- private s... | false |
Other | spring-projects | spring-framework | 905e3c1f9f429afaf582cb8cb774fa15e6d3f4fc.json | Avoid indefinite wait in JettyWebSocketClient
Closes gh-23994 | spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -22,6 +22,7 @@
import java.util.Map;
impor... | false |
Other | spring-projects | spring-framework | 834ebc44f8ddef719603f6f1ed70ef83bb337f2a.json | Fix inappropriate eager init. | spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java | @@ -473,10 +473,10 @@ public String[] getBeanNamesForType(ResolvableType type) {
public String[] getBeanNamesForType(ResolvableType type, boolean includeNonSingletons, boolean allowEagerInit) {
Class<?> resolved = type.resolve();
if (resolved != null && !type.hasGenerics()) {
- return getBeanNamesForType(reso... | false |
Other | spring-projects | spring-framework | f2b926467491098b09b38296b95d9543c97e22ad.json | Remove Jetbrains annotations | spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactory.java | @@ -27,7 +27,6 @@
import io.netty.buffer.PooledByteBufAllocator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jetbrains.annotations.NotNull;
import org.springframework.util.Assert;
@@ -113,7 +112,6 @@ public DataBuffer allocateBuffer(int initialCapacity) {
... | true |
Other | spring-projects | spring-framework | f2b926467491098b09b38296b95d9543c97e22ad.json | Remove Jetbrains annotations | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java | @@ -40,8 +40,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import org.jetbrains.annotations.NotNull;
-
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRange;
@@ -322,7 +320,6 ... | true |
Other | spring-projects | spring-framework | f2b926467491098b09b38296b95d9543c97e22ad.json | Remove Jetbrains annotations | spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequestBuilder.java | @@ -38,8 +38,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import org.jetbrains.annotations.NotNull;
-
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpInputMessage;
@@ -349,12... | true |
Other | spring-projects | spring-framework | f2b926467491098b09b38296b95d9543c97e22ad.json | Remove Jetbrains annotations | spring-webmvc/src/main/java/org/springframework/web/servlet/function/support/RouterFunctionMapping.java | @@ -23,8 +23,6 @@
import javax.servlet.http.HttpServletRequest;
-import org.jetbrains.annotations.NotNull;
-
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
@@ -167,7 +165,7 @@ private vo... | true |
Other | spring-projects | spring-framework | d611c7484f834fcc9fc090e271e96478d3931157.json | Fix Checkstyle violation | spring-aop/src/test/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcutTests.java | @@ -20,9 +20,6 @@
import org.springframework.aop.MethodMatcher;
import org.springframework.aop.Pointcut;
-import org.springframework.aop.support.annotation.AnnotationClassFilter;
-import org.springframework.aop.support.annotation.AnnotationMatchingPointcut;
-import org.springframework.aop.support.annotation.Annotat... | false |
Other | spring-projects | spring-framework | ab58e2939795410b9a5b22d53228d31f3ee9d3ce.json | Remove scope information from published BOM
It seems that publishing a Gradle platform as a Maven POM writes all
dependencies with their scope information by default.
We don't want that when publishing the Spring Framework BOM, as it
forces the scope on projects depending on the BOM, unless they've
specified the scop... | framework-bom/framework-bom.gradle | @@ -18,6 +18,12 @@ publishing {
mavenJava(MavenPublication) {
artifactId = 'spring-framework-bom'
from components.javaPlatform
+ // remove scope information from published BOM
+ pom.withXml {
+ asNode().dependencyManagement.first().dependencies.first().each {
+ it.remove(it.scope.first())
+ }
+... | false |
Other | spring-projects | spring-framework | a51dc84cb16f54c3bfd5780b1a0f90c22f140e9f.json | Fix Checkstyle violation | spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java | @@ -45,7 +45,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
| false |
Other | spring-projects | spring-framework | 1dfe304da42bb4c9b87dec087258ab236cb54708.json | Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.
Closes gh-23524 | spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt | @@ -17,6 +17,7 @@
package org.springframework.web.reactive.function.server
import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.reactive.awaitFirst
import kotlinx.coroutines.reactor.mono
import org.springframework.core.io.Resource
import org.springframework.http.HttpMethod
@@ -64,7 +65,8 @@ fun coRou... | true |
Other | spring-projects | spring-framework | 1dfe304da42bb4c9b87dec087258ab236cb54708.json | Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.
Closes gh-23524 | spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt | @@ -62,7 +62,8 @@ fun router(routes: RouterFunctionDsl.() -> Unit) = RouterFunctionDsl(routes).bui
*/
class RouterFunctionDsl(private val init: RouterFunctionDsl.() -> Unit) {
- private val builder = RouterFunctions.route()
+ @PublishedApi
+ internal val builder = RouterFunctions.route()
/**
* Return a comp... | true |
Other | spring-projects | spring-framework | 1dfe304da42bb4c9b87dec087258ab236cb54708.json | Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.
Closes gh-23524 | spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDslTests.kt | @@ -21,6 +21,7 @@ import org.junit.jupiter.api.Test
import org.springframework.core.io.ClassPathResource
import org.springframework.http.HttpHeaders.*
import org.springframework.http.HttpMethod.*
+import org.springframework.http.HttpStatus
import org.springframework.http.MediaType.*
import org.springframework.web.... | true |
Other | spring-projects | spring-framework | 1dfe304da42bb4c9b87dec087258ab236cb54708.json | Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.
Closes gh-23524 | spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt | @@ -21,6 +21,7 @@ import org.junit.jupiter.api.Test
import org.springframework.core.io.ClassPathResource
import org.springframework.http.HttpHeaders.*
import org.springframework.http.HttpMethod.*
+import org.springframework.http.HttpStatus
import org.springframework.http.MediaType.*
import org.springframework.web.... | true |
Other | spring-projects | spring-framework | 1dfe304da42bb4c9b87dec087258ab236cb54708.json | Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.
Closes gh-23524 | spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt | @@ -60,7 +60,8 @@ fun router(routes: (RouterFunctionDsl.() -> Unit)) = RouterFunctionDsl(routes).b
*/
class RouterFunctionDsl(private val init: (RouterFunctionDsl.() -> Unit)) {
- private val builder = RouterFunctions.route()
+ @PublishedApi
+ internal val builder = RouterFunctions.route()
/**
* Return a co... | true |
Other | spring-projects | spring-framework | 1dfe304da42bb4c9b87dec087258ab236cb54708.json | Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.
Closes gh-23524 | spring-webmvc/src/test/kotlin/org/springframework/web/servlet/function/RouterFunctionDslTests.kt | @@ -16,11 +16,13 @@
package org.springframework.web.servlet.function
-import org.assertj.core.api.Assertions.*
+import org.assertj.core.api.Assertions.assertThat
+import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.jupiter.api.Test
import org.springframework.core.io.ClassPathResourc... | true |
Other | spring-projects | spring-framework | 1dfe304da42bb4c9b87dec087258ab236cb54708.json | Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.
Closes gh-23524 | src/docs/asciidoc/web/webflux-functional.adoc | @@ -751,26 +751,41 @@ For instance, consider the following example:
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
.Java
----
-RouterFunction<ServerResponse> route = route()
- .path("/person", b1 -> b1
- .nest(accept(APPLICATION_JSON), b2 -> b2
- .GET("/{id}", handler::getPerson)
- .GET("", handle... | true |
Other | spring-projects | spring-framework | 5a0216d6573e56e9959829de89f7ced0824b1b8c.json | Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.
Closes gh-23524 | spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt | @@ -149,13 +149,25 @@ class CoRouterFunctionDsl(private val init: (CoRouterFunctionDsl.() -> Unit)) {
fun String.nest(r: (CoRouterFunctionDsl.() -> Unit)) = path(this).nest(r)
/**
- * Route to the given handler function if the given request predicate applies.
- * @see RouterFunctions.route
+ * Adds a route to ... | true |
Other | spring-projects | spring-framework | 5a0216d6573e56e9959829de89f7ced0824b1b8c.json | Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.
Closes gh-23524 | spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt | @@ -148,110 +148,194 @@ class RouterFunctionDsl(private val init: RouterFunctionDsl.() -> Unit) {
}
/**
- * Route to the given handler function if the given request predicate applies.
- * @see RouterFunctions.route
+ * Adds a route to the given handler function that handles all HTTP `GET` requests
+ * that ma... | true |
Other | spring-projects | spring-framework | 5a0216d6573e56e9959829de89f7ced0824b1b8c.json | Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.
Closes gh-23524 | spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDslTests.kt | @@ -16,10 +16,8 @@
package org.springframework.web.reactive.function.server
-import org.assertj.core.api.Assertions
import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.fail
import org.springframework.core.io.ClassPathResource
import o... | true |
Other | spring-projects | spring-framework | 5a0216d6573e56e9959829de89f7ced0824b1b8c.json | Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.
Closes gh-23524 | spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt | @@ -16,10 +16,8 @@
package org.springframework.web.reactive.function.server
-import org.assertj.core.api.Assertions
import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.jupiter.api.Test
-import org.junit.jupiter.api.fail
import org.springframework.core.io.ClassPathResource
import o... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.