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
c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json
Reduce overhead of char[] creation There are more locations which could benefit from not using a toCharArray on a String, but rather use the charAt method from the String itself. This to prevent an additional copy of the char[] being created.
spring-web/src/main/java/org/springframework/http/ResponseCookie.java
@@ -386,9 +386,8 @@ public static void validateCookieValue(@Nullable String value) { start = 1; end--; } - char[] chars = value.toCharArray(); for (int i = start; i < end; i++) { - char c = chars[i]; + char c = value.charAt(i); if (c < 0x21 || c == 0x22 || c == 0x2c || c == 0x3b || c == 0...
true
Other
spring-projects
spring-framework
c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json
Reduce overhead of char[] creation There are more locations which could benefit from not using a toCharArray on a String, but rather use the charAt method from the String itself. This to prevent an additional copy of the char[] being created.
spring-web/src/main/java/org/springframework/http/server/DefaultPathContainer.java
@@ -232,8 +232,6 @@ private static class DefaultPathSegment implements PathSegment { private final String valueToMatch; - private final char[] valueToMatchAsChars; - private final MultiValueMap<String, String> parameters; @@ -243,7 +241,6 @@ private static class DefaultPathSegment implements PathSegment ...
true
Other
spring-projects
spring-framework
c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json
Reduce overhead of char[] creation There are more locations which could benefit from not using a toCharArray on a String, but rather use the charAt method from the String itself. This to prevent an additional copy of the char[] being created.
spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java
@@ -791,7 +791,8 @@ public String apply(String source, Type type) { clear(this.currentLiteral); clear(this.currentVariable); clear(this.output); - for (char c : source.toCharArray()) { + for (int i = 0; i < source.length(); i++) { + char c = source.charAt(i); if (c == '{') { level++; ...
true
Other
spring-projects
spring-framework
c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json
Reduce overhead of char[] creation There are more locations which could benefit from not using a toCharArray on a String, but rather use the charAt method from the String itself. This to prevent an additional copy of the char[] being created.
spring-web/src/main/java/org/springframework/web/util/UriComponents.java
@@ -278,7 +278,8 @@ private static String sanitizeSource(String source) { int level = 0; int lastCharIndex = 0; char[] chars = new char[source.length()]; - for (char c : source.toCharArray()) { + for (int i = 0; i < source.length(); i++) { + char c = source.charAt(i); if (c == '{') { level++; ...
true
Other
spring-projects
spring-framework
c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json
Reduce overhead of char[] creation There are more locations which could benefit from not using a toCharArray on a String, but rather use the charAt method from the String itself. This to prevent an additional copy of the char[] being created.
spring-web/src/main/java/org/springframework/web/util/pattern/LiteralPathElement.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,18 +69,17 @@ public boolean matches(int ...
true
Other
spring-projects
spring-framework
c9b27af64f41cc4fd06ee41a0faaca867e3cba4e.json
Reduce overhead of char[] creation There are more locations which could benefit from not using a toCharArray on a String, but rather use the charAt method from the String itself. This to prevent an additional copy of the char[] being created.
spring-web/src/main/java/org/springframework/web/util/pattern/SingleCharWildcardedPathElement.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,11 +74,10 @@ public boolean matches(int ...
true
Other
spring-projects
spring-framework
9139cb85bd23d93fe72571d5cc23431860449f7e.json
Update javax.mail reference to jakarta.mail
src/docs/asciidoc/integration.adoc
@@ -4421,10 +4421,10 @@ This section describes how to send email with the Spring Framework. The following JAR needs to be on the classpath of your application in order to use the Spring Framework's email library: -* The https://javaee.github.io/javamail/[JavaMail] library +* The https://eclipse-ee4j.github.io/mail/...
false
Other
spring-projects
spring-framework
1c270d8d067bec08bbf419adeb354f96a3731780.json
Fix Checkstyle violation
spring-web/src/test/java/org/springframework/http/server/reactive/ErrorHandlerIntegrationTests.java
@@ -18,7 +18,6 @@ import java.net.URI; -import org.junit.Assume; import org.junit.jupiter.api.Assumptions; import reactor.core.publisher.Mono;
false
Other
spring-projects
spring-framework
33ffdd865d90d935d36c43e38797370bd6422842.json
Update copyright date
spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
false
Other
spring-projects
spring-framework
c84dd55863c4d872fef4f4334fd94051d266490a.json
Fix typo in ReflectionUtilsTests Closes gh-24344
spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java
@@ -362,7 +362,7 @@ void m95() { } void m96() { } void m97() { } void m98() { } void m99() { } } @Test - void getDecalredMethodsReturnsCopy() { + void getDeclaredMethodsReturnsCopy() { Method[] m1 = ReflectionUtils.getDeclaredMethods(A.class); Method[] m2 = ReflectionUtils.getDeclaredMethods(A.class); as...
false
Other
spring-projects
spring-framework
a741ae422b75e330dac655718ad91e0067a2caeb.json
Improve limit handling in StringDecoder The case of one data buffer containing multiple lines can could cause a buffer leak due to a suspected issue in concatMapIterable. This commit adds workarounds for that until the underlying issue is addressed. Closes gh-24339
spring-core/src/main/java/org/springframework/core/codec/StringDecoder.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,20 +94,44 @@ public Flux<String> decode(...
true
Other
spring-projects
spring-framework
a741ae422b75e330dac655718ad91e0067a2caeb.json
Improve limit handling in StringDecoder The case of one data buffer containing multiple lines can could cause a buffer leak due to a suspected issue in concatMapIterable. This commit adds workarounds for that until the underlying issue is addressed. Closes gh-24339
spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -130,17 +130,30 @@ void decodeNewLine() { ...
true
Other
spring-projects
spring-framework
08e9372ded3c36255389727465158007daae34f4.json
Restore response after beforeCommit action errors See gh-24186
spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpResponse.java
@@ -176,22 +176,25 @@ public boolean isCommitted() { @Override @SuppressWarnings("unchecked") public final Mono<Void> writeWith(Publisher<? extends DataBuffer> body) { - // Write as Mono if possible as an optimization hint to Reactor Netty - // ChannelSendOperator not necessary for Mono + // For Mono we can av...
true
Other
spring-projects
spring-framework
08e9372ded3c36255389727465158007daae34f4.json
Restore response after beforeCommit action errors See gh-24186
spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpResponseTests.java
@@ -20,11 +20,14 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; +import java.util.function.Consumer; +import java.util.function.Supplier; import org.junit.jupiter.api.Test; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor....
true
Other
spring-projects
spring-framework
8e5cad2af3d0465c98f7269ec1a6262a3f30c1bb.json
Add fast path for ClassUtils.hasMethod()
spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
@@ -365,7 +365,7 @@ public int hashCode() { */ private static boolean implementsInterface(Method method, Set<Class<?>> ifcs) { for (Class<?> ifc : ifcs) { - if (ClassUtils.hasMethod(ifc, method.getName(), method.getParameterTypes())) { + if (ClassUtils.hasMethod(ifc, method)) { return true; } }
true
Other
spring-projects
spring-framework
8e5cad2af3d0465c98f7269ec1a6262a3f30c1bb.json
Add fast path for ClassUtils.hasMethod()
spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java
@@ -97,7 +97,7 @@ public static boolean isExcludedFromDependencyCheck(PropertyDescriptor pd) { // It was declared by CGLIB, but we might still want to autowire it // if it was actually declared by the superclass. Class<?> superclass = wm.getDeclaringClass().getSuperclass(); - return !ClassUtils.hasMethod(supe...
true
Other
spring-projects
spring-framework
8e5cad2af3d0465c98f7269ec1a6262a3f30c1bb.json
Add fast path for ClassUtils.hasMethod()
spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java
@@ -207,7 +207,7 @@ protected boolean includeOperation(Method method, String beanKey) { * configured interfaces and is public, otherwise {@code false}. */ private boolean isPublicInInterface(Method method, String beanKey) { - return ((method.getModifiers() & Modifier.PUBLIC) > 0) && isDeclaredInInterface(metho...
true
Other
spring-projects
spring-framework
8e5cad2af3d0465c98f7269ec1a6262a3f30c1bb.json
Add fast path for ClassUtils.hasMethod()
spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java
@@ -145,7 +145,7 @@ else if (FactoryBean.class.isAssignableFrom(clazz)) { factoryBeanType = FactoryBean.class; } return (factoryBeanType != null && !method.getName().equals("getObject") && - ClassUtils.hasMethod(factoryBeanType, method.getName(), method.getParameterTypes())); + ClassUtils.hasMethod(fact...
true
Other
spring-projects
spring-framework
8e5cad2af3d0465c98f7269ec1a6262a3f30c1bb.json
Add fast path for ClassUtils.hasMethod()
spring-core/src/main/java/org/springframework/util/ClassUtils.java
@@ -1101,6 +1101,24 @@ public static boolean hasMethod(Class<?> clazz, String methodName, Class<?>... p return (getMethodIfAvailable(clazz, methodName, paramTypes) != null); } + /** + * Determine whether the given class has a public method with the given signature. + * @param clazz the clazz to analyze + * @p...
true
Other
spring-projects
spring-framework
ef6b1ba034f48178c922051870363a5c5f6139fc.json
Update copyright date
spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
true
Other
spring-projects
spring-framework
ef6b1ba034f48178c922051870363a5c5f6139fc.json
Update copyright date
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
true
Other
spring-projects
spring-framework
c480a99a773d461a6f64dab0dfceeaa6cefa2fb4.json
Trim line from LineInfo only once
spring-webflux/src/main/java/org/springframework/web/reactive/resource/AppCacheManifestTransformer.java
@@ -68,13 +68,13 @@ */ public class AppCacheManifestTransformer extends ResourceTransformerSupport { - private static final Collection<String> MANIFEST_SECTION_HEADERS = - Arrays.asList("CACHE MANIFEST", "NETWORK:", "FALLBACK:", "CACHE:"); - private static final String MANIFEST_HEADER = "CACHE MANIFEST"; p...
true
Other
spring-projects
spring-framework
c480a99a773d461a6f64dab0dfceeaa6cefa2fb4.json
Trim line from LineInfo only once
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java
@@ -65,13 +65,13 @@ */ public class AppCacheManifestTransformer extends ResourceTransformerSupport { - private static final Collection<String> MANIFEST_SECTION_HEADERS = - Arrays.asList("CACHE MANIFEST", "NETWORK:", "FALLBACK:", "CACHE:"); - private static final String MANIFEST_HEADER = "CACHE MANIFEST"; p...
true
Other
spring-projects
spring-framework
12a78d1af2fffa83ceffaa314aa5a20d6096e0e7.json
Update copyright date See gh-24305
spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
false
Other
spring-projects
spring-framework
59ade9169406e50e04d2923c170724830a11a499.json
Use HTTPS in link See gh-24268
spring-beans/src/main/java/org/springframework/beans/BeanUtils.java
@@ -57,7 +57,7 @@ * * <p>Mainly for internal use within the framework, but to some degree also * useful for application classes. Consider - * <a href="http://commons.apache.org/proper/commons-beanutils/">Apache Commons BeanUtils</a>, + * <a href="https://commons.apache.org/proper/commons-beanutils/">Apache Common...
false
Other
spring-projects
spring-framework
f585eb0b79429d4e2f15031ff237d16f01572b4d.json
Fix Javadoc typos See gh-24287
spring-beans/src/main/java/org/springframework/beans/factory/parsing/ParseState.java
@@ -53,7 +53,7 @@ public ParseState() { } /** - * Create a new {@code ParseState} whose {@link LinkedList} is a {@link Object#clone clone} + * Create a new {@code ParseState} whose {@link LinkedList} is an {@link Object#clone clone} * of that of the passed in {@code ParseState}. */ @SuppressWarnings("un...
true
Other
spring-projects
spring-framework
f585eb0b79429d4e2f15031ff237d16f01572b4d.json
Fix Javadoc typos See gh-24287
spring-beans/src/main/java/org/springframework/beans/factory/parsing/ReaderContext.java
@@ -152,14 +152,14 @@ public void warning(String message, @Nullable Object source, @Nullable ParseStat // Explicit parse events /** - * Fire an defaults-registered event. + * Fire a defaults-registered event. */ public void fireDefaultsRegistered(DefaultsDefinition defaultsDefinition) { this.eventListen...
true
Other
spring-projects
spring-framework
03ea92df9916baa5f8df37ec4154cb07fd2cea4d.json
Improve RestClientException Javadoc Closes gh-24288
spring-web/src/main/java/org/springframework/web/client/RestClientException.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,13 @@ package org.springframewor...
false
Other
spring-projects
spring-framework
68f9f8116cb49f7dc096edf72aa0b334b787bef7.json
Fix typo in RSocket reference See gh-24245
src/docs/asciidoc/rsocket.adoc
@@ -287,8 +287,8 @@ can be registered as follows: .Java ---- RSocketStrategies strategies = RSocketStrategies.builder() - .encoders(encoders -> encoders.add(new Jackson2CborEncoder)) - .decoders(decoders -> decoders.add(new Jackson2CborDecoder)) + .encoders(encoders -> encoders.add(new Jackson2CborEncoder())) + ...
false
Other
spring-projects
spring-framework
72895f081026df7e0b34807729d9cdea6c7ff4ec.json
Add test for combination of fixed date fields Added test for a fixed day-of-week and day-of-month combination. With the new CronExpression in place, this failure does not occur anymore. Closes gh-13621
spring-context/src/test/java/org/springframework/scheduling/support/CronExpressionTests.java
@@ -431,4 +431,17 @@ void monthSequence() { assertThat(expression.next(last)).isEqualTo(expected); } + @Test + public void fixedDays() { + CronExpression expression = CronExpression.parse("0 0 0 29 2 WED"); + + LocalDateTime last = LocalDateTime.of(2012, 2, 29, 1, 0); + assertThat(last.getDayOfWeek()).isEqual...
false
Other
spring-projects
spring-framework
969aa8ad4768b08751ca8e3791f4dc62605d0e20.json
Update copyright date
spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
true
Other
spring-projects
spring-framework
969aa8ad4768b08751ca8e3791f4dc62605d0e20.json
Update copyright date
spring-test/src/test/java/org/springframework/test/util/JsonPathExpectationsHelperTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2004-2020 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
true
Other
spring-projects
spring-framework
969aa8ad4768b08751ca8e3791f4dc62605d0e20.json
Update copyright date
spring-test/src/test/java/org/springframework/test/web/servlet/result/JsonPathResultMatchersTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
true
Other
spring-projects
spring-framework
5a12e7b2c513731e9bc36589583c7e5b5d96059f.json
Fix typo in test method names
spring-test/src/test/java/org/springframework/test/util/JsonPathExpectationsHelperTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2004-2019 the original author or authors. + * Copyright 2004-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,12 +67,12 @@ void existsForAnEmptyMap() ...
false
Other
spring-projects
spring-framework
5576321b04bd4112dd7414eff264cb46db931501.json
Reset charset field in MockHttpServletResponse Prior to this commit, calling reset() on MockHttpServletResponse did not reset the `charset` field to `false` which could result in the "Content-Type" header containing `;charset=null` which in turn would result in errors when parsing the "Content-Type" header. This comm...
spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
@@ -331,6 +331,7 @@ public boolean isCommitted() { public void reset() { resetBuffer(); this.characterEncoding = null; + this.charset = false; this.contentLength = 0; this.contentType = null; this.locale = Locale.getDefault();
true
Other
spring-projects
spring-framework
5576321b04bd4112dd7414eff264cb46db931501.json
Reset charset field in MockHttpServletResponse Prior to this commit, calling reset() on MockHttpServletResponse did not reset the `charset` field to `false` which could result in the "Content-Type" header containing `;charset=null` which in turn would result in errors when parsing the "Content-Type" header. This comm...
spring-test/src/test/java/org/springframework/mock/web/MockHttpServletResponseTests.java
@@ -458,4 +458,27 @@ private void assertPrimarySessionCookie(String expectedValue) { assertThat(((MockCookie) cookie).getSameSite()).isEqualTo("Lax"); } + @Test // gh-25501 + void resetResetsCharset() { + assertThat(response.isCharset()).isFalse(); + response.setCharacterEncoding("UTF-8"); + assertThat(respo...
true
Other
spring-projects
spring-framework
5576321b04bd4112dd7414eff264cb46db931501.json
Reset charset field in MockHttpServletResponse Prior to this commit, calling reset() on MockHttpServletResponse did not reset the `charset` field to `false` which could result in the "Content-Type" header containing `;charset=null` which in turn would result in errors when parsing the "Content-Type" header. This comm...
spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java
@@ -331,6 +331,7 @@ public boolean isCommitted() { public void reset() { resetBuffer(); this.characterEncoding = null; + this.charset = false; this.contentLength = 0; this.contentType = null; this.locale = Locale.getDefault();
true
Other
spring-projects
spring-framework
83e3c332a5a633d75c375306a44581b9c555cfef.json
Upgrade Ubuntu in CI images
ci/images/spring-framework-ci-image/Dockerfile
@@ -1,4 +1,4 @@ -FROM ubuntu:bionic-20200630 +FROM ubuntu:bionic-20200713 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh
true
Other
spring-projects
spring-framework
83e3c332a5a633d75c375306a44581b9c555cfef.json
Upgrade Ubuntu in CI images
ci/images/spring-framework-jdk11-ci-image/Dockerfile
@@ -1,4 +1,4 @@ -FROM ubuntu:bionic-20200630 +FROM ubuntu:bionic-20200713 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh
true
Other
spring-projects
spring-framework
83e3c332a5a633d75c375306a44581b9c555cfef.json
Upgrade Ubuntu in CI images
ci/images/spring-framework-jdk14-ci-image/Dockerfile
@@ -1,4 +1,4 @@ -FROM ubuntu:bionic-20200630 +FROM ubuntu:bionic-20200713 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh
true
Other
spring-projects
spring-framework
83e3c332a5a633d75c375306a44581b9c555cfef.json
Upgrade Ubuntu in CI images
ci/images/spring-framework-jdk15-ci-image/Dockerfile
@@ -1,4 +1,4 @@ -FROM ubuntu:bionic-20200630 +FROM ubuntu:bionic-20200713 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/jmh/java/org/springframework/http/MediaTypeBenchmark.java
@@ -88,7 +88,7 @@ public void fillCache() { "application/problem+json", "application/xhtml+xml", "application/rss+xml", - "application/stream+json", + "application/x-ndjson", "application/xml;q=0.9", "application/atom+xml", "application/cbor",
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/main/java/org/springframework/http/MediaType.java
@@ -216,16 +216,36 @@ public class MediaType extends MimeType implements Serializable { */ public static final String APPLICATION_RSS_XML_VALUE = "application/rss+xml"; + /** + * Public constant media type for {@code application/x-ndjson}. + * @since 5.3 + */ + public static final MediaType APPLICATION_NDJSON...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/main/java/org/springframework/http/codec/json/AbstractJackson2Encoder.java
@@ -67,15 +67,9 @@ public abstract class AbstractJackson2Encoder extends Jackson2CodecSupport imple private static final byte[] NEWLINE_SEPARATOR = {'\n'}; - private static final Map<MediaType, byte[]> STREAM_SEPARATORS; - private static final Map<String, JsonEncoding> ENCODINGS; static { - STREAM_SEPARATO...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/main/java/org/springframework/http/codec/json/Jackson2CodecSupport.java
@@ -35,6 +35,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.codec.Hints; import org.springframework.http.HttpLogging; +import org.springframework.http.MediaType; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive....
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/main/java/org/springframework/http/codec/json/Jackson2JsonEncoder.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package org.springframewor...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import org.springframework...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java
@@ -51,6 +51,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.springframework.http.MediaType.APPLICATION_JSON; +import static org.springframework.http.MediaType.APPLICATION_NDJSON; import static org.springframew...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,7 @@ import static org.assertj.co...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java
@@ -197,6 +197,43 @@ public void tokenizeArrayElements() { testTokenize(asList("[1", ",2,", "3]"), asList("1", "2", "3"), true); } + @Test + void tokenizeStream() { + + // NDJSON (Newline Delimited JSON), JSON Lines + testTokenize( + asList( + "{\"id\":1,\"name\":\"Robert\"}", + "\n", + "{\"i...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,8 +35,8 @@ import org.springframework.w...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java
@@ -53,10 +53,11 @@ public class HttpMessageWriterViewTests { @Test - public void supportedMediaTypes() throws Exception { - assertThat(this.view.getSupportedMediaTypes()).isEqualTo(Arrays.asList( + public void supportedMediaTypes() { + assertThat(this.view.getSupportedMediaTypes()).containsExactly( MediaT...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ReactiveTypeHandler.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import java.io.IOException; ...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd
@@ -250,7 +250,7 @@ By default, a SimpleAsyncTaskExecutor is used which does not re-use threads and is not recommended for production. As of 5.0 this executor is also used when a controller returns a reactive type that does streaming - (e.g. "text/event-stream" or "application/stream+json") for the blocking write...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ReactiveTypeHandlerTests.java
@@ -225,7 +225,7 @@ public void writeServerSentEventsWithBuilder() throws Exception { @Test public void writeStreamJson() throws Exception { - this.servletRequest.addHeader("Accept", "application/stream+json"); + this.servletRequest.addHeader("Accept", "application/x-ndjson"); Sinks.StandaloneFluxSink<Bar>...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
src/docs/asciidoc/testing-webtestclient.adoc
@@ -378,7 +378,7 @@ You can also use https://github.com/jayway/JsonPath[JSONPath] expressions, as fo [[webtestclient-stream]] === Streaming Responses -To test infinite streams (for example, `"text/event-stream"` or `"application/stream+json"`), +To test infinite streams (for example, `"text/event-stream"` or `"appl...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
src/docs/asciidoc/web/webflux.adoc
@@ -755,9 +755,9 @@ into ``TokenBuffer``'s each representing a JSON object. * When decoding to a single-value publisher (e.g. `Mono`), there is one `TokenBuffer`. * When decoding to a multi-value publisher (e.g. `Flux`), each `TokenBuffer` is passed to the `ObjectMapper` as soon as enough bytes are received for a fu...
true
Other
spring-projects
spring-framework
683cc2eb7f7ce19720cac33e57d72277396bbc19.json
Add NDJSON and deprecate application/stream+json Closes gh-21283
src/docs/asciidoc/web/webmvc.adoc
@@ -4581,7 +4581,7 @@ Reactive return values are handled as follows: * A single-value promise is adapted to, similar to using `DeferredResult`. Examples include `Mono` (Reactor) or `Single` (RxJava). -* A multi-value stream with a streaming media type (such as `application/stream+json` +* A multi-value stream with ...
true
Other
spring-projects
spring-framework
f19afe0c76de5eaf93f49a1ba88d006d2c063747.json
Upgrade JDK 11, 14 and 15 EA
ci/images/get-jdk-url.sh
@@ -6,13 +6,13 @@ case "$1" in echo "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u262-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u262b10.tar.gz" ;; java11) - echo "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7...
false
Other
spring-projects
spring-framework
650cbeee1433aa38619691946c316d9d03a6512d.json
Avoid infinite loop in AnnotationScanner Prior to this commit, scanning for annotations resulted in an infinite loop when using the INHERITED_ANNOTATIONS search strategy and a class filter that filters out visited classes. This commit avoids an infinite loop in AnnotationsScanner's processClassInheritedAnnotations(.....
spring-core/src/main/java/org/springframework/core/annotation/AnnotationsScanner.java
@@ -151,6 +151,8 @@ private static <C, R> R processClassInheritedAnnotations(C context, Class<?> sou return result; } if (isFiltered(source, context, classFilter)) { + source = source.getSuperclass(); + aggregateIndex++; continue; } Annotation[] declaredAnnotations =
true
Other
spring-projects
spring-framework
650cbeee1433aa38619691946c316d9d03a6512d.json
Avoid infinite loop in AnnotationScanner Prior to this commit, scanning for annotations resulted in an infinite loop when using the INHERITED_ANNOTATIONS search strategy and a class filter that filters out visited classes. This commit avoids an infinite loop in AnnotationsScanner's processClassInheritedAnnotations(.....
spring-core/src/test/java/org/springframework/core/annotation/AnnotationsScannerTests.java
@@ -499,6 +499,22 @@ public String finish(String result) { assertThat(result).isEqualTo("OK"); } + @Test + void scanWithFilteredAll() { + List<Integer> indexes = new ArrayList<>(); + String result = AnnotationsScanner.scan(this, WithSingleSuperclass.class, + SearchStrategy.INHERITED_ANNOTATIONS, + (conte...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java
@@ -648,7 +648,7 @@ private PointcutBody getPointcutBody(String[] tokens, int startIndex) { } if (tokens[currentIndex].endsWith(")")) { - sb.append(tokens[currentIndex].substring(0, tokens[currentIndex].length() - 1)); + sb.append(tokens[currentIndex], 0, tokens[currentIndex].length() - 1); re...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java
@@ -501,7 +501,7 @@ private void addStrippedPropertyPaths(List<String> strippedPaths, String nestedP if (endIndex != -1) { String prefix = propertyPath.substring(0, startIndex); String key = propertyPath.substring(startIndex, endIndex + 1); - String suffix = propertyPath.substring(endIndex + 1, propert...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-context/src/main/java/org/springframework/scheduling/config/TaskExecutorFactoryBean.java
@@ -107,7 +107,7 @@ private void determinePoolSizeRange(ThreadPoolTaskExecutor executor) { int separatorIndex = this.poolSize.indexOf('-'); if (separatorIndex != -1) { corePoolSize = Integer.parseInt(this.poolSize.substring(0, separatorIndex)); - maxPoolSize = Integer.parseInt(this.poolSize.substrin...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
@@ -310,7 +310,7 @@ public void setConcurrency(String concurrency) { int separatorIndex = concurrency.indexOf('-'); if (separatorIndex != -1) { setConcurrentConsumers(Integer.parseInt(concurrency.substring(0, separatorIndex))); - setMaxConcurrentConsumers(Integer.parseInt(concurrency.substring(separator...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java
@@ -126,7 +126,7 @@ public void setConcurrency(String concurrency) { try { int separatorIndex = concurrency.indexOf('-'); if (separatorIndex != -1) { - setConcurrentConsumers(Integer.parseInt(concurrency.substring(separatorIndex + 1, concurrency.length()))); + setConcurrentConsumers(Integer.parseInt(co...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsActivationSpecConfig.java
@@ -226,7 +226,7 @@ public void setConcurrency(String concurrency) { try { int separatorIndex = concurrency.indexOf('-'); if (separatorIndex != -1) { - setMaxConcurrency(Integer.parseInt(concurrency.substring(separatorIndex + 1, concurrency.length()))); + setMaxConcurrency(Integer.parseInt(concurrency....
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java
@@ -269,7 +269,7 @@ private String unescape(String inString) { int index = inString.indexOf('\\'); while (index >= 0) { - sb.append(inString.substring(pos, index)); + sb.append(inString, pos, index); if (index + 1 >= inString.length()) { throw new StompConversionException("Illegal escape sequence a...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompEncoder.java
@@ -212,7 +212,7 @@ else if (sb != null){ private StringBuilder getStringBuilder(@Nullable StringBuilder sb, String inString, int i) { if (sb == null) { sb = new StringBuilder(inString.length()); - sb.append(inString.substring(0, i)); + sb.append(inString, 0, i); } return sb; }
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-test/src/main/java/org/springframework/test/web/servlet/setup/PatternMappingFilterProxy.java
@@ -73,7 +73,7 @@ public PatternMappingFilterProxy(Filter delegate, String... urlPatterns) { private void addUrlPattern(String urlPattern) { Assert.notNull(urlPattern, "Found null URL Pattern"); if (urlPattern.startsWith(EXTENSION_MAPPING_PATTERN)) { - this.endsWithMatches.add(urlPattern.substring(1, urlPatte...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-web/src/main/java/org/springframework/web/util/UriTemplate.java
@@ -225,7 +225,7 @@ else if (c == '}') { throw new IllegalArgumentException( "No custom regular expression specified after ':' in \"" + variable + "\""); } - String regex = variable.substring(idx + 1, variable.length()); + String regex = variable.substring(idx + 1); patte...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java
@@ -245,12 +245,12 @@ protected StringBuilder expandTargetUrlTemplate(String targetUrl, String name = matcher.group(1); Object value = (model.containsKey(name) ? model.get(name) : uriVariables.get(name)); Assert.notNull(value, () -> "No value for URI variable '" + name + "'"); - result.append(targetUrl.su...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
@@ -278,7 +278,7 @@ String createUrl() throws JspException { } else { if (this.context.endsWith("/")) { - url.append(this.context.substring(0, this.context.length() - 1)); + url.append(this.context, 0, this.context.length() - 1); } else { url.append(this.context);
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java
@@ -386,7 +386,7 @@ protected StringBuilder replaceUriTemplateVariables( if (value == null) { throw new IllegalArgumentException("Model has no value for key '" + name + "'"); } - result.append(targetUrl.substring(endLastMatch, matcher.start())); + result.append(targetUrl, endLastMatch, matcher.start())...
true
Other
spring-projects
spring-framework
ab859fcc963195d612c2341986f2e7cda7e1dc0c.json
Refine use of substring operations Closes gh-25445
spring-websocket/src/main/java/org/springframework/web/socket/WebSocketExtension.java
@@ -160,7 +160,7 @@ private static WebSocketExtension parseExtension(String extension) { int eqIndex = parameter.indexOf('='); if (eqIndex != -1) { String attribute = parameter.substring(0, eqIndex); - String value = parameter.substring(eqIndex + 1, parameter.length()); + String value = paramete...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java
@@ -648,7 +648,7 @@ private PointcutBody getPointcutBody(String[] tokens, int startIndex) { } if (tokens[currentIndex].endsWith(")")) { - sb.append(tokens[currentIndex].substring(0, tokens[currentIndex].length() - 1)); + sb.append(tokens[currentIndex], 0, tokens[currentIndex].length() - 1); re...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java
@@ -513,7 +513,7 @@ private void addStrippedPropertyPaths(List<String> strippedPaths, String nestedP if (endIndex != -1) { String prefix = propertyPath.substring(0, startIndex); String key = propertyPath.substring(startIndex, endIndex + 1); - String suffix = propertyPath.substring(endIndex + 1, propert...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-context/src/main/java/org/springframework/scheduling/config/TaskExecutorFactoryBean.java
@@ -107,7 +107,7 @@ private void determinePoolSizeRange(ThreadPoolTaskExecutor executor) { int separatorIndex = this.poolSize.indexOf('-'); if (separatorIndex != -1) { corePoolSize = Integer.parseInt(this.poolSize.substring(0, separatorIndex)); - maxPoolSize = Integer.parseInt(this.poolSize.substrin...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
@@ -310,7 +310,7 @@ public void setConcurrency(String concurrency) { int separatorIndex = concurrency.indexOf('-'); if (separatorIndex != -1) { setConcurrentConsumers(Integer.parseInt(concurrency.substring(0, separatorIndex))); - setMaxConcurrentConsumers(Integer.parseInt(concurrency.substring(separator...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java
@@ -126,7 +126,7 @@ public void setConcurrency(String concurrency) { try { int separatorIndex = concurrency.indexOf('-'); if (separatorIndex != -1) { - setConcurrentConsumers(Integer.parseInt(concurrency.substring(separatorIndex + 1, concurrency.length()))); + setConcurrentConsumers(Integer.parseInt(co...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsActivationSpecConfig.java
@@ -226,7 +226,7 @@ public void setConcurrency(String concurrency) { try { int separatorIndex = concurrency.indexOf('-'); if (separatorIndex != -1) { - setMaxConcurrency(Integer.parseInt(concurrency.substring(separatorIndex + 1, concurrency.length()))); + setMaxConcurrency(Integer.parseInt(concurrency....
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java
@@ -269,7 +269,7 @@ private String unescape(String inString) { int index = inString.indexOf('\\'); while (index >= 0) { - sb.append(inString.substring(pos, index)); + sb.append(inString, pos, index); if (index + 1 >= inString.length()) { throw new StompConversionException("Illegal escape sequence a...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompEncoder.java
@@ -212,7 +212,7 @@ else if (sb != null){ private StringBuilder getStringBuilder(@Nullable StringBuilder sb, String inString, int i) { if (sb == null) { sb = new StringBuilder(inString.length()); - sb.append(inString.substring(0, i)); + sb.append(inString, 0, i); } return sb; }
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-test/src/main/java/org/springframework/test/web/servlet/setup/PatternMappingFilterProxy.java
@@ -71,7 +71,7 @@ public PatternMappingFilterProxy(Filter delegate, String... urlPatterns) { private void addUrlPattern(String urlPattern) { Assert.notNull(urlPattern, "Found null URL Pattern"); if (urlPattern.startsWith(EXTENSION_MAPPING_PATTERN)) { - this.endsWithMatches.add(urlPattern.substring(1, urlPatte...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-web/src/main/java/org/springframework/web/util/UriTemplate.java
@@ -225,7 +225,7 @@ else if (c == '}') { throw new IllegalArgumentException( "No custom regular expression specified after ':' in \"" + variable + "\""); } - String regex = variable.substring(idx + 1, variable.length()); + String regex = variable.substring(idx + 1); patte...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java
@@ -245,12 +245,12 @@ protected StringBuilder expandTargetUrlTemplate(String targetUrl, String name = matcher.group(1); Object value = (model.containsKey(name) ? model.get(name) : uriVariables.get(name)); Assert.notNull(value, () -> "No value for URI variable '" + name + "'"); - result.append(targetUrl.su...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
@@ -278,7 +278,7 @@ String createUrl() throws JspException { } else { if (this.context.endsWith("/")) { - url.append(this.context.substring(0, this.context.length() - 1)); + url.append(this.context, 0, this.context.length() - 1); } else { url.append(this.context);
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java
@@ -386,7 +386,7 @@ protected StringBuilder replaceUriTemplateVariables( if (value == null) { throw new IllegalArgumentException("Model has no value for key '" + name + "'"); } - result.append(targetUrl.substring(endLastMatch, matcher.start())); + result.append(targetUrl, endLastMatch, matcher.start())...
true
Other
spring-projects
spring-framework
edfc6c0293fc45096876d9821670892aba2ea2ec.json
Refine use of substring operations Closes gh-25445
spring-websocket/src/main/java/org/springframework/web/socket/WebSocketExtension.java
@@ -160,7 +160,7 @@ private static WebSocketExtension parseExtension(String extension) { int eqIndex = parameter.indexOf('='); if (eqIndex != -1) { String attribute = parameter.substring(0, eqIndex); - String value = parameter.substring(eqIndex + 1, parameter.length()); + String value = paramete...
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequester.java
@@ -23,6 +23,7 @@ import io.rsocket.Payload; import io.rsocket.RSocket; import io.rsocket.RSocketClient; +import io.rsocket.core.RSocketClientAdapter; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -49,7 +50,10 @@ final class DefaultRSocketRequeste...
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilder.java
@@ -184,8 +184,7 @@ public RSocketRequester transport(ClientTransport transport) { metaMimeType, dataMimeType, setupPayload, strategies); return new DefaultRSocketRequester( - new DefaultRSocketRequester.ClientRSocketDelegate(connector.toRSocketClient(transport)), - dataMimeType, metaMimeType, strategie...
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/main/java/org/springframework/messaging/rsocket/RSocketRequester.java
@@ -22,6 +22,7 @@ import io.rsocket.ConnectionSetupPayload; import io.rsocket.Payload; import io.rsocket.RSocket; +import io.rsocket.RSocketClient; import io.rsocket.transport.ClientTransport; import io.rsocket.transport.netty.client.TcpClientTransport; import io.rsocket.transport.netty.client.WebsocketClientTran...
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/test/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilderTests.java
@@ -206,8 +206,8 @@ public void frameDecoderMatchesDataBufferFactory() throws Exception { } private ConnectionSetupPayload getConnectionSetupPayload(RSocketRequester requester) { - // Trigger connection and sending of SETUP frame - requester.route("any-route").data("any-data").send().block(); + // Trigger conn...
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/test/java/org/springframework/messaging/rsocket/RSocketBufferLeakTests.java
@@ -94,7 +94,7 @@ void setupOnce() { @AfterAll void tearDownOnce() { - requester.dispose(); + requester.rsocketClient().dispose(); server.dispose(); context.close(); }
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/test/java/org/springframework/messaging/rsocket/RSocketClientToServerIntegrationTests.java
@@ -96,7 +96,7 @@ public static void setupOnce() { @AfterAll public static void tearDownOnce() { - requester.dispose(); + requester.rsocketClient().dispose(); server.dispose(); }
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/test/java/org/springframework/messaging/rsocket/RSocketServerToClientIntegrationTests.java
@@ -110,14 +110,14 @@ private static void connectAndRunTest(String connectionRoute) { .rsocketConnector(connector -> connector.acceptor(responder)) .tcp("localhost", server.address().getPort()); - // Make a request to cause a connection to be established. - requester.route("fnf").send().block(); + /...
true
Other
spring-projects
spring-framework
9fe1feea9a91c5826c07be8fa2f00edb6b5c5107.json
Provide access to underlying RSocketClient The recently introduced support for RSocketClient in commit 7c982511426eebea3d34730ab128bb39a55a9de6 did not expose the underlying client in order to avoid a hard dependency on RSocket 1.1 for the time being. However such access appears to be necessary, e.g. for Spring Integr...
spring-messaging/src/test/kotlin/org/springframework/messaging/rsocket/RSocketClientToServerCoroutinesIntegrationTests.kt
@@ -271,7 +271,7 @@ class RSocketClientToServerCoroutinesIntegrationTests { @AfterAll @JvmStatic fun tearDownOnce() { - requester.dispose() + requester.rsocketClient().dispose() server.dispose() } }
true
Other
spring-projects
spring-framework
523d2f88be9f2087b058f45f7830f8f2b8d5707e.json
Use List.sort instead of Collection.sort in tests Closes gh-25454
spring-core/src/test/java/org/springframework/core/annotation/OrderSourceProviderTests.java
@@ -43,7 +43,7 @@ void plainComparator() { C c2 = new C(-5); items.add(c); items.add(c2); - Collections.sort(items, comparator); + items.sort(comparator); assertOrder(items, c2, c); } @@ -54,7 +54,7 @@ void listNoFactoryMethod() { B b = new B(); List<?> items = Arrays.asList(a, c, b); - Colle...
true
Other
spring-projects
spring-framework
523d2f88be9f2087b058f45f7830f8f2b8d5707e.json
Use List.sort instead of Collection.sort in tests Closes gh-25454
spring-core/src/test/java/org/springframework/core/convert/converter/ConvertingComparatorTests.java
@@ -99,15 +99,15 @@ private void testConversion(ConvertingComparator<String, Integer> convertingComp void shouldGetMapEntryKeys() throws Exception { ArrayList<Entry<String, Integer>> list = createReverseOrderMapEntryList(); Comparator<Map.Entry<String, Integer>> comparator = ConvertingComparator.mapEntryKeys(ne...
true
Other
spring-projects
spring-framework
523d2f88be9f2087b058f45f7830f8f2b8d5707e.json
Use List.sort instead of Collection.sort in tests Closes gh-25454
spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java
@@ -510,64 +510,64 @@ void patternComparatorSort() { paths.add(null); paths.add("/hotels/new"); - Collections.sort(paths, comparator); + paths.sort(comparator); assertThat(paths.get(0)).isEqualTo("/hotels/new"); assertThat(paths.get(1)).isNull(); paths.clear(); paths.add("/hotels/new"); paths...
true