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 | 8a1588ae295614858089c3382364825aa9f8b7e7.json | Add support for DataSize
This commit provides a data type to represents a size in bytes and other
standard unit.
Issue: SPR-17154 | spring-core/src/main/java/org/springframework/util/unit/DataSize.java | @@ -0,0 +1,248 @@
+/*
+ * 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 | 8a1588ae295614858089c3382364825aa9f8b7e7.json | Add support for DataSize
This commit provides a data type to represents a size in bytes and other
standard unit.
Issue: SPR-17154 | spring-core/src/main/java/org/springframework/util/unit/DataUnit.java | @@ -0,0 +1,82 @@
+/*
+ * 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 | 8a1588ae295614858089c3382364825aa9f8b7e7.json | Add support for DataSize
This commit provides a data type to represents a size in bytes and other
standard unit.
Issue: SPR-17154 | spring-core/src/main/java/org/springframework/util/unit/package-info.java | @@ -0,0 +1,25 @@
+/*
+ * 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 | 8a1588ae295614858089c3382364825aa9f8b7e7.json | Add support for DataSize
This commit provides a data type to represents a size in bytes and other
standard unit.
Issue: SPR-17154 | spring-core/src/test/java/org/springframework/util/unit/DataSizeTests.java | @@ -0,0 +1,158 @@
+/*
+ * 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 | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockHttpServletRequestDsl.kt | @@ -0,0 +1,208 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMultipartHttpServletRequestDsl.kt | @@ -0,0 +1,46 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ ... | true |
Other | spring-projects | spring-framework | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcExtensions.kt | @@ -0,0 +1,213 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultHandlersDsl.kt | @@ -0,0 +1,65 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ ... | true |
Other | spring-projects | spring-framework | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | spring-test/src/main/kotlin/org/springframework/test/web/servlet/MockMvcResultMatchersDsl.kt | @@ -0,0 +1,149 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | spring-test/src/main/kotlin/org/springframework/test/web/servlet/ResultActionsDsl.kt | @@ -0,0 +1,33 @@
+package org.springframework.test.web.servlet
+
+/**
+ * Provide a [ResultActions] Kotlin DSL in order to be able to write idiomatic Kotlin code.
+ *
+ * @author Sebastien Deleuze
+ * @since 5.2
+ */
+class ResultActionsDsl(private val actions: ResultActions) {
+
+ /**
+ * Provide access to [MockMvcRe... | true |
Other | spring-projects | spring-framework | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | spring-test/src/test/kotlin/org/springframework/test/web/servlet/MockMvcExtensionsTests.kt | @@ -0,0 +1,172 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+... | true |
Other | spring-projects | spring-framework | 0c332286f167ee5a431be8b2705a9178c273e14e.json | Add MockMvc Kotlin DSL
This commit introduces a `MockMvc` Kotlin DSL via a set of
extensions like `MockMvc.get` or `MockMvc.request`
that provide a Kotlin idiomatic and easily discoverable
API while staying close to the original Java API design.
Closes gh-1951 | src/docs/asciidoc/languages/kotlin.adoc | @@ -326,6 +326,31 @@ class UserHandler(builder: WebClient.Builder) {
Read this blog post about https://medium.com/@elizarov/structured-concurrency-722d765aa952[structured concurrency]
to understand how to run code concurrently with Coroutines.
+=== MockMvc DSL
+
+A Kotlin DSL is provided via `MockMvc` Kotlin extens... | true |
Other | spring-projects | spring-framework | b7d60b9b898a3915ddf7f92449d8c9b7aa6458a2.json | Improve @EventListener documentation | spring-context/src/main/java/org/springframework/context/event/EventListener.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 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.
@@ -48,18 +48,39 @@
* return type is either a... | true |
Other | spring-projects | spring-framework | b7d60b9b898a3915ddf7f92449d8c9b7aa6458a2.json | Improve @EventListener documentation | src/docs/asciidoc/core/core-beans.adoc | @@ -8463,6 +8463,10 @@ The following table describes the standard events that Spring provides:
| A web-specific event telling all beans that an HTTP request has been serviced. This
event is published after the request is complete. This event is only applicable to
web applications that use Spring's `DispatcherSer... | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-aop/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's proxy-based AOP framework.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-aspects/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's AspectJ-based aspects.
-</p>
-</body>
-</html> | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-beans/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's core beans and bean factory support.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-context-support/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Support classes for integrating common third-party libraries into a Spring application context.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-context/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's central application context runtime. Also includes scheduling and remoting abstractions.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-core/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's core utilities, used by many other Spring modules.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-instrument/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's instrumentation agent for JVM bootstrapping.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-jdbc/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's JDBC support package. Includes DataSource setup support as well as JDBC access support.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-jms/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's JMS support package, covering synchronous JMS access as well as message listener containers.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-messaging/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring Framework's support for messaging architectures and protocols.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-orm/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's O/R Mapping package: supporting JPA as well as native Hibernate.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-test/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's TestContext framework. Also includes common Servlet and Portlet API mocks.
-</p>
-</body>
-</html> | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-tx/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's transaction infrastructure. Also includes DAO support and JCA integration.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-web/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's core web support packages, for any kind of web environment.
-</p>
-</body>
-</html>
\ No newline at end of file | true |
Other | spring-projects | spring-framework | 70cf597484ecc850f9f1bb48812df18014e95ba0.json | Remove obsolete overview.html files | spring-webmvc/src/main/java/overview.html | @@ -1,7 +0,0 @@
-<html>
-<body>
-<p>
-Spring's MVC framework in its Servlet API version. Includes support for common view technologies.
-</p>
-</body>
-</html> | true |
Other | spring-projects | spring-framework | fe458aabde4d4850d01b3d0b9e8dd078ea569e88.json | Fix typo in `my-property'
Closes gh-22500 | src/docs/asciidoc/core/core-beans.adoc | @@ -8478,7 +8478,7 @@ context parameters. It can optionally enable a {api-spring-framework}/jndi/JndiP
See the javadoc for details.
Concretely, when you use the `StandardEnvironment`, the call to `env.containsProperty("my-property")`
-returns true if a `my-property` system property or `my-propertyi` environment var... | false |
Other | spring-projects | spring-framework | 0ca5afd8e469321230cae7004f75c1a955737aa6.json | Fix broken test | spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBeanTests.java | @@ -49,14 +49,10 @@ public void defaultExecutor() throws Exception {
public static class ExecutorConfig {
@Bean
- public ThreadPoolExecutorFactoryBean executorFactory() {
+ public ThreadPoolExecutorFactoryBean executor() {
return new ThreadPoolExecutorFactoryBean();
}
- @Bean
- public ExecutorServic... | false |
Other | spring-projects | spring-framework | a9f251db42469bf6cad3ccdad2b7171eb5e5bcb8.json | Fix broken Javadoc links | build.gradle | @@ -173,8 +173,8 @@ configure(allprojects) { project ->
ext.javadocLinks = [
"http://docs.oracle.com/javase/8/docs/api/",
"http://docs.oracle.com/javaee/7/api/",
- "http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/", // CommonJ
- "http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.... | true |
Other | spring-projects | spring-framework | a9f251db42469bf6cad3ccdad2b7171eb5e5bcb8.json | Fix broken Javadoc links | spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.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.
@@ -72,14 +72,14 @@ protected boolean hasError(... | true |
Other | spring-projects | spring-framework | 8e2b14a2b6fc59aebeebcdebcaed67177cd3eacd.json | Fix Javadoc links to Quartz
See https://github.com/quartz-scheduler/quartz-scheduler.org-site/issues/42 | build.gradle | @@ -38,6 +38,7 @@ ext {
kotlinVersion = "1.3.21"
log4jVersion = "2.11.2"
nettyVersion = "4.1.33.Final"
+ quartzVersion = "2.3.0"
reactorVersion = "Californium-SR5"
rxjavaVersion = "1.3.8"
rxjavaAdapterVersion = "1.2.1"
@@ -181,7 +182,7 @@ configure(allprojects) { p... | true |
Other | spring-projects | spring-framework | 8e2b14a2b6fc59aebeebcdebcaed67177cd3eacd.json | Fix Javadoc links to Quartz
See https://github.com/quartz-scheduler/quartz-scheduler.org-site/issues/42 | spring-context-support/spring-context-support.gradle | @@ -11,7 +11,7 @@ dependencies {
optional("javax.cache:cache-api:1.1.0")
optional("com.github.ben-manes.caffeine:caffeine:2.7.0")
optional("net.sf.ehcache:ehcache:2.10.4")
- optional("org.quartz-scheduler:quartz:2.3.0")
+ optional("org.quartz-scheduler:quartz:${quartzVersion}")
optional("org.codehaus.fabric3.ap... | true |
Other | spring-projects | spring-framework | 74e9825a654b9699ccea7b481629a8c297f6ef73.json | Fix CheckStyle violation | spring-tx/src/main/java/org/springframework/transaction/package-info.java | @@ -1,6 +1,6 @@
/**
* Spring's core transaction management APIs (independent of any specific transaction
- * management system); an exception hierarchy for Spring's transaction infrastructure;
+ * management system); an exception hierarchy for Spring's transaction infrastructure;
* and transaction manager, defini... | false |
Other | spring-projects | spring-framework | dd1330d05ee139987000ce8802357611090fef49.json | Fix CheckStyle violations
See gh-18490 | spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java | @@ -28,7 +28,7 @@
* <p>These events may be consumed for various reasons, such as resetting <em>mock</em>
* beans or tracing test execution. Since these events may be consumed by regular
* Spring beans, they can be shared among different test classes.
- *
+ *
* <h3>Supported Events</h3>
* <ul>
* <li>{@link ... | true |
Other | spring-projects | spring-framework | dd1330d05ee139987000ce8802357611090fef49.json | Fix CheckStyle violations
See gh-18490 | spring-test/src/main/java/org/springframework/test/context/event/annotation/PrepareTestInstance.java | @@ -16,13 +16,13 @@
package org.springframework.test.context.event.annotation;
-import org.springframework.context.event.EventListener;
-import org.springframework.test.context.event.PrepareTestInstanceEvent;
-
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annot... | true |
Other | spring-projects | spring-framework | dd1330d05ee139987000ce8802357611090fef49.json | Fix CheckStyle violations
See gh-18490 | spring-test/src/main/java/org/springframework/test/context/event/annotation/package-info.java | @@ -1,4 +1,4 @@
/**
* Test event annotations for the <em>Spring TestContext Framework</em>.
*/
-package org.springframework.test.context.event.annotation;
\ No newline at end of file
+package org.springframework.test.context.event.annotation; | true |
Other | spring-projects | spring-framework | dd1330d05ee139987000ce8802357611090fef49.json | Fix CheckStyle violations
See gh-18490 | spring-test/src/main/java/org/springframework/test/context/event/package-info.java | @@ -1,4 +1,4 @@
/**
* Test event support classes for the <em>Spring TestContext Framework</em>.
*/
-package org.springframework.test.context.event;
\ No newline at end of file
+package org.springframework.test.context.event; | true |
Other | spring-projects | spring-framework | ac495d7380e56b0160391a7764fb7e2f5eefb8c9.json | Polish ForwardedHeaderFilter and related code
Issue: SPR-16506 | spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java | @@ -101,13 +101,13 @@ public void setRemoveOnly(boolean removeOnly) {
}
/**
- * Use this property to enable relative redirects as explained in and also
- * using the same response wrapper as {@link RelativeRedirectFilter} does.
- * Or if both filters are used, only one will wrap the response.
+ * Use this pro... | true |
Other | spring-projects | spring-framework | ac495d7380e56b0160391a7764fb7e2f5eefb8c9.json | Polish ForwardedHeaderFilter and related code
Issue: SPR-16506 | spring-web/src/main/java/org/springframework/web/filter/RelativeRedirectFilter.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -27,13 +27,14 @@
/**
* Overrides {@link... | true |
Other | spring-projects | spring-framework | ac495d7380e56b0160391a7764fb7e2f5eefb8c9.json | Polish ForwardedHeaderFilter and related code
Issue: SPR-16506 | spring-web/src/main/java/org/springframework/web/filter/RelativeRedirectResponseWrapper.java | @@ -15,14 +15,13 @@
*/
package org.springframework.web.filter;
-import java.io.IOException;
-import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import org.springframework.http.HttpHeaders;
import org.springframework.http.... | true |
Other | spring-projects | spring-framework | ac495d7380e56b0160391a7764fb7e2f5eefb8c9.json | Polish ForwardedHeaderFilter and related code
Issue: SPR-16506 | spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java | @@ -433,18 +433,22 @@ public void sendRedirectWhenRequestOnlyAndNoXForwardedThenUsesRelativeRedirects(
}
private String sendRedirect(final String location) throws ServletException, IOException {
- MockHttpServletResponse response = doWithFiltersAndGetResponse(this.filter, new OncePerRequestFilter() {
+ Filter f... | true |
Other | spring-projects | spring-framework | 4db0d999af9a6d5ca9ee09df1b8c08bcaf9cf5dd.json | Polish UriBuilderFactory and implementation
Issue: SPR-16422 | spring-web/src/main/java/org/springframework/web/client/RestTemplate.java | @@ -298,18 +298,16 @@ else if (this.uriTemplateHandler instanceof org.springframework.web.util.Abstrac
}
/**
- * Configure the {@link UriTemplateHandler} to use to expand URI templates.
- * By default the {@link DefaultUriBuilderFactory} is used which relies on
- * Spring's URI template support and exposes sev... | true |
Other | spring-projects | spring-framework | 4db0d999af9a6d5ca9ee09df1b8c08bcaf9cf5dd.json | Polish UriBuilderFactory and implementation
Issue: SPR-16422 | spring-web/src/main/java/org/springframework/web/util/DefaultUriBuilderFactory.java | @@ -17,6 +17,7 @@
package org.springframework.web.util;
import java.net.URI;
+import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -28,19 +29,56 @@
import org.springframework.util.ObjectUtils;
/**
- * Default implementation of {@link UriBuilderFac... | true |
Other | spring-projects | spring-framework | 4db0d999af9a6d5ca9ee09df1b8c08bcaf9cf5dd.json | Polish UriBuilderFactory and implementation
Issue: SPR-16422 | spring-web/src/main/java/org/springframework/web/util/UriBuilderFactory.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -16,24 +16,24 @@
package org.springframewor... | true |
Other | spring-projects | spring-framework | 4db0d999af9a6d5ca9ee09df1b8c08bcaf9cf5dd.json | Polish UriBuilderFactory and implementation
Issue: SPR-16422 | spring-web/src/main/java/org/springframework/web/util/UriTemplateHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -20,30 +20,27 @@
import java.util.Map;
/... | true |
Other | spring-projects | spring-framework | 3367df8637983c1e5a2c17d1a2e6819e04ca7ad6.json | Suggest use of OkHttp MockWebServer
Issue: SPR-16482 | src/docs/asciidoc/testing-webtestclient.adoc | @@ -1,17 +1,17 @@
[[webtestclient]]
= WebTestClient
-`WebTestClient` is a non-blocking, reactive client for testing web servers. It uses
-the reactive <<web-reactive.adoc#webflux-webclient, WebClient>> internally to perform
-requests and provides a fluent API to verify responses. The `WebTestClient` can connect
-to... | true |
Other | spring-projects | spring-framework | 3367df8637983c1e5a2c17d1a2e6819e04ca7ad6.json | Suggest use of OkHttp MockWebServer
Issue: SPR-16482 | src/docs/asciidoc/web/webflux-webclient.adoc | @@ -1,25 +1,29 @@
[[webflux-client]]
= WebClient
-The `spring-webflux` module includes a non-blocking, reactive client for HTTP requests
-with Reactive Streams back pressure. It shares
-<<web-reactive.adoc#webflux-codecs,HTTP codecs>> and other infrastructure with the
+The `spring-webflux` module includes a reactiv... | true |
Other | spring-projects | spring-framework | 1aeae5d40ddf87deb6268d5d470b5c59cba3c176.json | Fix compiler error | spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java | @@ -17,6 +17,7 @@
package org.springframework.http.codec.json;
import java.nio.charset.StandardCharsets;
+import java.util.Collections;
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper; | false |
Other | spring-projects | spring-framework | 24adc7d3c6a27102696ebacd14bbc247a6acba8b.json | Delete unused imports | spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileDecoder.java | @@ -17,14 +17,10 @@
package org.springframework.http.codec.json;
import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.smile.SmileFactory;
-import or... | true |
Other | spring-projects | spring-framework | 24adc7d3c6a27102696ebacd14bbc247a6acba8b.json | Delete unused imports | spring-web/src/main/java/org/springframework/http/codec/json/Jackson2SmileEncoder.java | @@ -17,7 +17,6 @@
package org.springframework.http.codec.json;
import java.nio.charset.StandardCharsets;
-import java.util.Collections;
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper; | true |
Other | spring-projects | spring-framework | 24adc7d3c6a27102696ebacd14bbc247a6acba8b.json | Delete unused imports | spring-web/src/main/java/org/springframework/http/server/reactive/ReactorServerHttpRequest.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -36,7 +36,6 @@
import org.springframework.u... | true |
Other | spring-projects | spring-framework | 24adc7d3c6a27102696ebacd14bbc247a6acba8b.json | Delete unused imports | spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java | @@ -38,7 +38,6 @@
import static org.junit.Assert.assertTrue;
import static org.springframework.core.ResolvableType.forClass;
import static org.springframework.http.MediaType.APPLICATION_JSON;
-import static org.springframework.http.MediaType.APPLICATION_STREAM_JSON;
/**
* Unit tests for {@link Jackson2SmileDeco... | true |
Other | spring-projects | spring-framework | 24adc7d3c6a27102696ebacd14bbc247a6acba8b.json | Delete unused imports | spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java | @@ -30,7 +30,6 @@
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.support.DataBufferTestUtils;
-import org.springframework.http.MediaType;
import org.springframework.http.codec.Pojo;
import org.springframewor... | true |
Other | spring-projects | spring-framework | 24adc7d3c6a27102696ebacd14bbc247a6acba8b.json | Delete unused imports | spring-web/src/test/java/org/springframework/web/server/session/InMemoryWebSessionStoreTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -21,7 +21,6 @@
import org.junit.Test;
-... | true |
Other | spring-projects | spring-framework | b449928691553ba791adf20850e9179730b4b3a2.json | Avoid unused arguments for internal delegates | spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -20,6 +20,7 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | b449928691553ba791adf20850e9179730b4b3a2.json | Avoid unused arguments for internal delegates | spring-core/src/main/java/org/springframework/asm/ClassWriter.java | @@ -1699,7 +1699,7 @@ int addUninitializedType(final String type, final int offset) {
*/
private Item addType(final Item item) {
++typeCount;
- Item result = new Item(typeCount, key);
+ Item result = new Item(typeCount, item);
put(result);
if (typeTable == null) {
... | true |
Other | spring-projects | spring-framework | 4ee09c89b5e1bf891f57e6f0b46382c28b487f2b.json | Fix regression in MappingJackson2MessageConverter
As of 4.3.13 MappingJackson2MessageConverter uses the MethodParameter
hint to obtain generic type information but it needs to be careful, and
nest one level, if the target parameter type has a Message wrapper.
Issue: SPR-16486 | spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -39,7 +39,6 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 4ee09c89b5e1bf891f57e6f0b46382c28b487f2b.json | Fix regression in MappingJackson2MessageConverter
As of 4.3.13 MappingJackson2MessageConverter uses the MethodParameter
hint to obtain generic type information but it needs to be careful, and
nest one level, if the target parameter type has a Message wrapper.
Issue: SPR-16486 | spring-messaging/src/test/java/org/springframework/messaging/converter/MappingJackson2MessageConverterTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * 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.
@@ -46,7 +46,7 @@
import static org.junit.Asse... | true |
Other | spring-projects | spring-framework | 4ee09c89b5e1bf891f57e6f0b46382c28b487f2b.json | Fix regression in MappingJackson2MessageConverter
As of 4.3.13 MappingJackson2MessageConverter uses the MethodParameter
hint to obtain generic type information but it needs to be careful, and
nest one level, if the target parameter type has a Message wrapper.
Issue: SPR-16486 | spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/MessageMethodArgumentResolverTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * 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.
@@ -26,6 +26,7 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 13f942fab726783c8c69a36d07bfc29df650d62a.json | Fix indentation in doc
Closes gh-1676 | src/docs/asciidoc/web/webmvc.adoc | @@ -2077,7 +2077,7 @@ alternatively set `@ModelAttribute(binding=false)` as shown below:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
-@ModelAttribute
+ @ModelAttribute
public AccountForm setUpForm() {
return new AccountForm();
} | false |
Other | spring-projects | spring-framework | 9a81d0276e4b94093b3c6a5a1d409d68a64204f7.json | Fix checkstyle issue | spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java | @@ -16,8 +16,6 @@
package org.springframework.web.reactive.result.method;
-import static org.springframework.web.reactive.result.method.InvocableHandlerMethodKt.*;
-
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
@@ -44,6 +42,8 @@... | false |
Other | spring-projects | spring-framework | 31a2b4ef467b30d1b253822016b1603296cbb103.json | Remove outdated link in documentation
See gh-22597 | src/docs/asciidoc/core/core-beans.adoc | @@ -10,7 +10,7 @@ This chapter covers Spring's Inversion of Control (IoC) container.
== Introduction to the Spring IoC Container and Beans
This chapter covers the Spring Framework implementation of the Inversion of Control
-(IoC) principle. (See <<overview.adoc#background-ioc,Inversion of Control>>.) IoC
+(IoC) pri... | false |
Other | spring-projects | spring-framework | 29f382b04eda1c3b8cabb231bcb014395643c725.json | Simplify String concatenation | spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java | @@ -150,9 +150,7 @@ public String getShortDescription() {
* @see #getBeanDefinition()
*/
public String getLongDescription() {
- StringBuilder sb = new StringBuilder(getShortDescription());
- sb.append(": ").append(this.beanDefinition);
- return sb.toString();
+ return getShortDescription() + ": " + this.bea... | true |
Other | spring-projects | spring-framework | 29f382b04eda1c3b8cabb231bcb014395643c725.json | Simplify String concatenation | spring-core/src/main/java/org/springframework/core/ResolvableType.java | @@ -965,13 +965,10 @@ public String toString() {
return "?";
}
}
- StringBuilder result = new StringBuilder(this.resolved.getName());
if (hasGenerics()) {
- result.append('<');
- result.append(StringUtils.arrayToDelimitedString(getGenerics(), ", "));
- result.append('>');
+ return this.resolved.... | true |
Other | spring-projects | spring-framework | 29f382b04eda1c3b8cabb231bcb014395643c725.json | Simplify String concatenation | spring-expression/src/main/java/org/springframework/expression/spel/ast/Selection.java | @@ -205,19 +205,16 @@ protected ValueRef getValueRef(ExpressionState state) throws EvaluationException
@Override
public String toStringAST() {
- StringBuilder sb = new StringBuilder();
+ return prefix() + getChild(0).toStringAST() + "]";
+ }
+
+ private String prefix() {
switch (this.variant) {
- case ALL:... | true |
Other | spring-projects | spring-framework | 29f382b04eda1c3b8cabb231bcb014395643c725.json | Simplify String concatenation | spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java | @@ -403,12 +403,11 @@ public void setCharacterEncoding(@Nullable String characterEncoding) {
private void updateContentTypeHeader() {
if (StringUtils.hasLength(this.contentType)) {
- StringBuilder sb = new StringBuilder(this.contentType);
- if (!this.contentType.toLowerCase().contains(CHARSET_PREFIX) &&
- ... | true |
Other | spring-projects | spring-framework | 29f382b04eda1c3b8cabb231bcb014395643c725.json | Simplify String concatenation | spring-webflux/src/main/java/org/springframework/web/reactive/result/condition/AbstractMediaTypeExpression.java | @@ -108,12 +108,10 @@ public int hashCode() {
@Override
public String toString() {
- StringBuilder builder = new StringBuilder();
if (this.isNegated) {
- builder.append('!');
+ return '!' + this.mediaType.toString();
}
- builder.append(this.mediaType.toString());
- return builder.toString();
+ retur... | true |
Other | spring-projects | spring-framework | 29f382b04eda1c3b8cabb231bcb014395643c725.json | Simplify String concatenation | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java | @@ -92,12 +92,10 @@ public int hashCode() {
@Override
public String toString() {
- StringBuilder builder = new StringBuilder();
if (this.isNegated) {
- builder.append('!');
+ return '!' + this.mediaType.toString();
}
- builder.append(this.mediaType.toString());
- return builder.toString();
+ return ... | true |
Other | spring-projects | spring-framework | 88ca255c95c66e87e7dd6b54cc6f159a7fea7c0b.json | Fix checkstyle issue | spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/ReactorNettyWebSocketClient.java | @@ -92,7 +92,7 @@ public void setMaxFramePayloadLength(int maxFramePayloadLength) {
* @since 5.2
*/
public int getMaxFramePayloadLength() {
- return maxFramePayloadLength;
+ return this.maxFramePayloadLength;
}
| false |
Other | spring-projects | spring-framework | b88aad6b39f23bb0dd67b69be9a1104049eadf3c.json | Avoid payload conversion if unnecessary
Closes gh-22386 | spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.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.
@@ -221,6 +221,9 @@ protected Object convertFro... | true |
Other | spring-projects | spring-framework | b88aad6b39f23bb0dd67b69be9a1104049eadf3c.json | Avoid payload conversion if unnecessary
Closes gh-22386 | spring-messaging/src/test/java/org/springframework/messaging/converter/MappingJackson2MessageConverterTests.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.
@@ -110,6 +110,14 @@ public void fromMessageUnt... | true |
Other | spring-projects | spring-framework | b343e73eb0f7b80d4357454577a2e4e023d82125.json | Add streaming responses to Spring MVC Test section
Closes gh-22544 | src/docs/asciidoc/testing.adoc | @@ -5132,6 +5132,20 @@ instances, as the following example shows:
Registered filters are invoked through the `MockFilterChain` from `spring-test`, and the
last filter delegates to the `DispatcherServlet`.
+
+[[spring-mvc-test-vs-streaming-response]]
+===== Streaming Responses
+
+There are no options built into Spri... | false |
Other | spring-projects | spring-framework | 620a898e60f107afe963f9e2db9c78e54f3fd399.json | Fix typo in documentation
See gh-22394 | src/docs/asciidoc/web/websocket.adoc | @@ -695,8 +695,8 @@ The following example shows how to do so in Java configuration:
[subs="verbatim,quotes"]
----
@Configuration
- @EnableWebSocket
- public class WebSocketConfig implements WebSocketConfigurer {
+ @EnableWebSocketMessageBroker
+ public class WebSocketConfig implements WebSocketMessageBrokerConfigur... | false |
Other | spring-projects | spring-framework | 8ddb1e7201f6726fee6ebc798e43a80094a2df0f.json | Fix a typo in @NonNullFields
Prior to this commit, `@NonNullFields` had a redundant `@see NonNullFields`
declaration instead of `@see NonNullApi` in its JavaDoc.
Closes gh-22553 | spring-core/src/main/java/org/springframework/lang/NonNullFields.java | @@ -36,7 +36,7 @@
*
* @author Sebastien Deleuze
* @since 5.0
- * @see NonNullFields
+ * @see NonNullApi
* @see Nullable
* @see NonNull
*/ | false |
Other | spring-projects | spring-framework | 238286caaf6d3e46cb620993ac737d1610d8f8d8.json | Update @since tag in Eclipse code template | src/eclipse/org.eclipse.jdt.ui.prefs | @@ -59,4 +59,4 @@ org.eclipse.jdt.ui.importorder=java;javax;;org.springframework;\#;
org.eclipse.jdt.ui.javadoc=true
org.eclipse.jdt.ui.ondemandthreshold=9999
org.eclipse.jdt.ui.staticondemandthreshold=1
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><template... | false |
Other | spring-projects | spring-framework | 60b72d721dc2f02279ff360d4ea1de98ae62d986.json | Polish: do simple clean-up | spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java | @@ -156,8 +156,7 @@ private boolean process(MatchCallback callback, Yaml yaml, Resource resource) {
if (logger.isDebugEnabled()) {
logger.debug("Loading from YAML: " + resource);
}
- Reader reader = new UnicodeReader(resource.getInputStream());
- try {
+ try (Reader reader = new UnicodeReader(resourc... | true |
Other | spring-projects | spring-framework | 60b72d721dc2f02279ff360d4ea1de98ae62d986.json | Polish: do simple clean-up | spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java | @@ -663,7 +663,7 @@ public void addQualifier(AutowireCandidateQualifier qualifier) {
* Return whether this bean has the specified qualifier.
*/
public boolean hasQualifier(String typeName) {
- return this.qualifiers.keySet().contains(typeName);
+ return this.qualifiers.containsKey(typeName);
}
/** | true |
Other | spring-projects | spring-framework | 60b72d721dc2f02279ff360d4ea1de98ae62d986.json | Polish: do simple clean-up | spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java | @@ -267,7 +267,7 @@ private String unescape(String inString) {
if (index + 1 >= inString.length()) {
throw new StompConversionException("Illegal escape sequence at index " + index + ": " + inString);
}
- Character c = inString.charAt(index + 1);
+ char c = inString.charAt(index + 1);
if (c == 'r') ... | true |
Other | spring-projects | spring-framework | 75fa9c4266a516039b1b797fe8ccd8b2614e7647.json | Fix checkstyle issues | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/UnknownHttpStatusCodeException.java | @@ -1,3 +1,19 @@
+/*
+ * 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
+ ... | false |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java | @@ -60,9 +60,21 @@ public interface ClientResponse {
/**
* Return the status code of this response.
+ * @return the status as an HttpStatus enum value
+ * @throws IllegalArgumentException in case of an unknown HTTP status code
+ * @see HttpStatus#valueOf(int)
*/
HttpStatus statusCode();
+ /**
+ * Retu... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java | @@ -76,6 +76,11 @@ public HttpStatus statusCode() {
return this.response.getStatusCode();
}
+ @Override
+ public int rawStatusCode() {
+ return this.response.getRawStatusCode();
+ }
+
@Override
public Headers headers() {
return this.headers;
@@ -177,11 +182,11 @@ public <T> Mono<ResponseEntity<T>> toEnti... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java | @@ -59,6 +59,7 @@
* Default implementation of {@link WebClient}.
*
* @author Rossen Stoyanchev
+ * @author Brian Clozel
* @since 5.0
*/
class DefaultWebClient implements WebClient {
@@ -375,7 +376,7 @@ private static class DefaultResponseSpec implements ResponseSpec {
private final Mono<ClientResponse> ... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/UnknownHttpStatusCodeException.java | @@ -0,0 +1,23 @@
+package org.springframework.web.reactive.function.client;
+
+import java.nio.charset.Charset;
+
+import org.springframework.http.HttpHeaders;
+
+/**
+ * Exception thrown when an unknown (or custom) HTTP status code is received.
+ *
+ * @author Brian Clozel
+ * @since 5.1
+ */
+public class UnknownHttp... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClientResponseException.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -47,6 +47,7 @@ public class WebClientRespons... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/main/java/org/springframework/web/reactive/function/client/support/ClientResponseWrapper.java | @@ -77,6 +77,11 @@ public HttpStatus statusCode() {
return this.delegate.statusCode();
}
+ @Override
+ public int rawStatusCode() {
+ return this.delegate.rawStatusCode();
+ }
+
@Override
public Headers headers() {
return this.delegate.headers(); | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/main/java/org/springframework/web/reactive/function/server/HandlerFilterFunction.java | @@ -74,7 +74,7 @@ default HandlerFunction<R> apply(HandlerFunction<T> handler) {
/**
* Adapt the given request processor function to a filter function that only operates
- * on the {@code ClientRequest}.
+ * on the {@code ServerRequest}.
* @param requestProcessor the request processor
* @return the filte... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultClientResponseTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2017 the original author or authors.
+ * 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.
@@ -54,6 +54,7 @@
/**
* @author Arjen Pout... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java | @@ -55,6 +55,7 @@
*
* @author Brian Clozel
* @author Rossen Stoyanchev
+ * @author Denys Ivano
*/
public class WebClientIntegrationTests {
@@ -413,7 +414,7 @@ public void shouldGetErrorSignalOn404() {
.bodyToMono(String.class);
StepVerifier.create(result)
- .expectError(WebClientException.class)... | true |
Other | spring-projects | spring-framework | 038af9a303aa631a66384542eef8c3f0c955d2f8.json | Improve unknown status codes handling by WebClient
Prior to this commit, `WebClient` would throw `IllegalArgumentException`
when receiving an HTTP response with an unknown HTTP status code.
This commit is a follow up of SPR-16748 (supporting non-standard HTTP
status codes on the reactive `ClientHttpResponse`), and is... | spring-webflux/src/test/java/org/springframework/web/reactive/function/client/support/ClientResponseWrapperTests.java | @@ -65,6 +65,14 @@ public void statusCode() {
assertSame(status, wrapper.statusCode());
}
+ @Test
+ public void rawStatusCode() {
+ int status = 999;
+ when(mockResponse.rawStatusCode()).thenReturn(status);
+
+ assertEquals(status, wrapper.rawStatusCode());
+ }
+
@Test
public void headers() {
ClientRes... | true |
Other | spring-projects | spring-framework | e9ed45ee3b3deb1fd0cb5973829e132b48a7b290.json | Fix code completion typo | spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java | @@ -35,7 +35,6 @@
import org.springframework.util.Assert;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.async.DeferredResult.DeferredResultHandler;
-import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
/**
* The central class for... | false |
Other | spring-projects | spring-framework | a40d25a760249e59e9c077648f844591c3acac8b.json | Remove no-op classes in web-related Java config | spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java | @@ -28,7 +28,6 @@
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Bean;
import org.springframework.lang.Nullable;
-import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.conver... | true |
Other | spring-projects | spring-framework | a40d25a760249e59e9c077648f844591c3acac8b.json | Remove no-op classes in web-related Java config | spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java | @@ -458,9 +458,8 @@ public void userBroadcastsDisabledWithSimpleBroker() {
UserDestinationMessageHandler handler = context.getBean(UserDestinationMessageHandler.class);
assertNull(handler.getBroadcastDestination());
- String name = "userRegistryMessageHandler";
- MessageHandler messageHandler = context.getBea... | true |
Other | spring-projects | spring-framework | a40d25a760249e59e9c077648f844591c3acac8b.json | Remove no-op classes in web-related Java config | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java | @@ -24,7 +24,6 @@
import java.util.Map;
import java.util.function.Predicate;
import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.BeanFactoryUtils;
@@ -448,12 +447,15 @@ protected void configureCon... | true |
Other | spring-projects | spring-framework | a40d25a760249e59e9c077648f844591c3acac8b.json | Remove no-op classes in web-related Java config | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java | @@ -67,7 +67,6 @@
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.HandlerExecutionChain;
import org.springframework.web.servlet.ViewResolver;
-import org.springframework.web.servlet.handler.AbstractHandlerMapping;
import org.springframework.web.servlet.handler... | true |
Other | spring-projects | spring-framework | 6aa6d91ea98b16c38ac3c5c10e61c0be30b7b686.json | Remove deprecated constructors in WebSocket config
In preparation for SPR-16189. | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketHandlerRegistration.java | @@ -21,7 +21,6 @@
import java.util.List;
import org.springframework.lang.Nullable;
-import org.springframework.scheduling.TaskScheduler;
import org.springframework.util.Assert;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
@@ -58,23 +57,6 @@
@Nullable
pri... | true |
Other | spring-projects | spring-framework | 6aa6d91ea98b16c38ac3c5c10e61c0be30b7b686.json | Remove deprecated constructors in WebSocket config
In preparation for SPR-16189. | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketMessageBrokerConfigurer.java | @@ -30,7 +30,7 @@
*
* @author Rossen Stoyanchev
* @since 4.0.1
- * @deprecated in favor of simply using {@link WebSocketMessageBrokerConfigurer}
+ * @deprecated as of 5.0 in favor of simply using {@link WebSocketMessageBrokerConfigurer}
* which has default methods, made possible by a Java 8 baseline.
*/
@Dep... | true |
Other | spring-projects | spring-framework | 6aa6d91ea98b16c38ac3c5c10e61c0be30b7b686.json | Remove deprecated constructors in WebSocket config
In preparation for SPR-16189. | spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistration.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2016 the original author or authors.
+ * 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.
@@ -18,7 +18,6 @@
import java.util.Arrays;
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.