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 | a8c777b35facc210caf8bf32d19f01f296aa9bea.json | Remove reference to Fluxion | spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleHandlerResultHandlerTests.java | @@ -59,7 +59,7 @@ public void supports() throws NoSuchMethodException {
hm = new HandlerMethod(controller, TestController.class.getMethod("streamVoid"));
type = ResolvableType.forMethodParameter(hm.getReturnType());
- // Reactor Fluxion is a Publisher
+ // Reactor Flux is a Publisher
assertTrue(resultHandl... | false |
Other | spring-projects | spring-framework | 6f2c968925c28d7269e1dada1d97b7dff2d6cf07.json | Support strict URI variable encoding
The DefaulUriTemplateHandler now provides a strictEncoding property
which if turned on encodes everything outside the reserved char set.
This is in contrast to the default policy of encoding only illegal
charaters depending on the URI component type.
Issue: SPR-11652 | spring-web/src/main/java/org/springframework/web/util/DefaultUriTemplateHandler.java | @@ -16,8 +16,10 @@
package org.springframework.web.util;
+import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -36,6 +38,8 @@ public class DefaultUriTemplateHandler implements UriTempla... | true |
Other | spring-projects | spring-framework | 6f2c968925c28d7269e1dada1d97b7dff2d6cf07.json | Support strict URI variable encoding
The DefaulUriTemplateHandler now provides a strictEncoding property
which if turned on encodes everything outside the reserved char set.
This is in contrast to the default policy of encoding only illegal
charaters depending on the URI component type.
Issue: SPR-11652 | spring-web/src/test/java/org/springframework/web/util/DefaultUriTemplateHandlerTests.java | @@ -49,7 +49,8 @@ public void baseUrlWithPartialPath() throws Exception {
}
@Test
- public void expandWithFullPath() throws Exception {
+ public void parsePathOff() throws Exception {
+ this.handler.setParsePath(false);
Map<String, String> vars = new HashMap<>(2);
vars.put("hotel", "1");
vars.put("publi... | true |
Other | spring-projects | spring-framework | 44c32128dcdbd4fc848ae0873d4a6aa84383569c.json | Add newline at the beginning of textarea JSP tags
This commit adds a newline char at the beginning of textarea tags
values. As per the HTML 4.01 spec (and browsers behavior), a line break
following a start tag is ignored.
This can lead to Spring's textarea tag to ignore a line break char at
the beginning of a tag val... | spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TextareaTag.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -98,7 +98,7 @@ protected int writeTagContent... | true |
Other | spring-projects | spring-framework | 44c32128dcdbd4fc848ae0873d4a6aa84383569c.json | Add newline at the beginning of textarea JSP tags
This commit adds a newline char at the beginning of textarea tags
values. As per the HTML 4.01 spec (and browsers behavior), a line break
following a start tag is ignored.
This can lead to Spring's textarea tag to ignore a line break char at
the beginning of a tag val... | spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -121,6 +121,16 @@ public void customBind() t... | true |
Other | spring-projects | spring-framework | 067994712df49b50b955e93944245a770b3962ad.json | Make TestContextManager.getTestContext() public
This commit changes the visibility of the getTestContext() method in
TestContextManager from 'protected' to 'public' in order to support
test method injection in JUnit 5 and similar use cases.
Issue: SPR-14011 | spring-test/src/main/java/org/springframework/test/context/TestContextManager.java | @@ -124,7 +124,7 @@ public TestContextManager(TestContextBootstrapper testContextBootstrapper) {
/**
* Get the {@link TestContext} managed by this {@code TestContextManager}.
*/
- protected final TestContext getTestContext() {
+ public final TestContext getTestContext() {
return this.testContext;
}
| false |
Other | spring-projects | spring-framework | 7b861c9a8aeda83ef6844633901d6f00ea28c4c0.json | Add defaultUseWrapper support to Jackson builder
Issue: SPR-13975 | spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java | @@ -47,6 +47,8 @@
import com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.FilterProvider;
+import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule;
+import com.fasterxml.jackson.dataformat.xml.XmlFac... | true |
Other | spring-projects | spring-framework | 7b861c9a8aeda83ef6844633901d6f00ea28c4c0.json | Add defaultUseWrapper support to Jackson builder
Issue: SPR-13975 | spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java | @@ -324,6 +324,15 @@ public void setIndentOutput(boolean indentOutput) {
this.builder.indentOutput(indentOutput);
}
+ /**
+ * Define if a wrapper will be used for indexed (List, array) properties or not by
+ * default (only applies to {@link XmlMapper}).
+ * @since 4.3
+ */
+ public void setDefaultUseWrapper... | true |
Other | spring-projects | spring-framework | 7b861c9a8aeda83ef6844633901d6f00ea28c4c0.json | Add defaultUseWrapper support to Jackson builder
Issue: SPR-13975 | spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java | @@ -22,9 +22,11 @@
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Optional... | true |
Other | spring-projects | spring-framework | 0d6f80052d7a08bec69c2ef70818ff6551b54c5c.json | Support conditional updates in ServletWebRequest
Prior to this commit, `ServletWebRequest.checkNotModified` would only
support conditional GET/HEAD requests with "If-Modified-Since" and/or
"If-None-Match" request headers. In those cases, the server would return
"HTTP 304 Not Modified" responses if the resource didn't ... | spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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,6 +21,7 @@
import java.util.Iterator;
... | true |
Other | spring-projects | spring-framework | 0d6f80052d7a08bec69c2ef70818ff6551b54c5c.json | Support conditional updates in ServletWebRequest
Prior to this commit, `ServletWebRequest.checkNotModified` would only
support conditional GET/HEAD requests with "If-Modified-Since" and/or
"If-None-Match" request headers. In those cases, the server would return
"HTTP 304 Not Modified" responses if the resource didn't ... | spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -126,10 +126,10 @@ public interface WebReque... | true |
Other | spring-projects | spring-framework | 0d6f80052d7a08bec69c2ef70818ff6551b54c5c.json | Support conditional updates in ServletWebRequest
Prior to this commit, `ServletWebRequest.checkNotModified` would only
support conditional GET/HEAD requests with "If-Modified-Since" and/or
"If-None-Match" request headers. In those cases, the server would return
"HTTP 304 Not Modified" responses if the resource didn't ... | spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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,6 +16,8 @@
package org.springframewor... | true |
Other | spring-projects | spring-framework | 0d6f80052d7a08bec69c2ef70818ff6551b54c5c.json | Support conditional updates in ServletWebRequest
Prior to this commit, `ServletWebRequest.checkNotModified` would only
support conditional GET/HEAD requests with "If-Modified-Since" and/or
"If-None-Match" request headers. In those cases, the server would return
"HTTP 304 Not Modified" responses if the resource didn't ... | src/asciidoc/web-mvc.adoc | @@ -4449,17 +4449,24 @@ This can be achieved as follows:
----
There are two key elements here: calling `request.checkNotModified(lastModified)` and
-returning `null`. The former sets the response status to 304 before it returns `true`.
+returning `null`. The former sets the appropriate response status and headers
+... | true |
Other | spring-projects | spring-framework | 61824b1aded8f975f3e02e0b1a7ace63a993a6fb.json | Remove trailing whitespace from source code | spring-context/src/test/java/org/springframework/context/expression/FactoryBeanAccessTests.java | @@ -56,7 +56,7 @@ public void factoryBeanAccess() { // SPR9511
} catch (BeanIsNotAFactoryException binafe) {
// success
}
-
+
// No such bean
try {
expr = new SpelExpressionParser().parseRaw("@truck"); | true |
Other | spring-projects | spring-framework | 61824b1aded8f975f3e02e0b1a7ace63a993a6fb.json | Remove trailing whitespace from source code | spring-context/src/test/java/org/springframework/context/expression/MapAccessorTests.java | @@ -37,50 +37,50 @@ public class MapAccessorTests {
@Test
public void mapAccessorCompilable() {
Map<String, Object> testMap = getSimpleTestMap();
- StandardEvaluationContext sec = new StandardEvaluationContext();
+ StandardEvaluationContext sec = new StandardEvaluationContext();
sec.addPropertyAccessor(n... | true |
Other | spring-projects | spring-framework | 61824b1aded8f975f3e02e0b1a7ace63a993a6fb.json | Remove trailing whitespace from source code | spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java | @@ -3000,11 +3000,11 @@ public void constructorReference_SPR13781() {
assertEquals("java.lang.String",expression.getValue());
assertCanCompile(expression);
assertEquals("java.lang.String",expression.getValue());
-
+
// These tests below verify that the chain of static accesses (either method/property or ... | true |
Other | spring-projects | spring-framework | 61824b1aded8f975f3e02e0b1a7ace63a993a6fb.json | Remove trailing whitespace from source code | spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java | @@ -1955,7 +1955,7 @@ public void SPR13055() throws Exception {
res = parser.parseExpression("#root.![values()]").getValue(context, List.class);
assertEquals("[[test12, test11], [test22, test21]]", res.toString());
}
-
+
@Test
public void AccessingFactoryBean_spr9511() {
StandardEvaluationContext contex... | true |
Other | spring-projects | spring-framework | 61824b1aded8f975f3e02e0b1a7ace63a993a6fb.json | Remove trailing whitespace from source code | spring-web/src/test/java/org/springframework/http/client/OkHttpAsyncClientHttpRequestFactoryTests.java | @@ -24,7 +24,7 @@
* @author Luciano Leggieri
*/
public class OkHttpAsyncClientHttpRequestFactoryTests extends AbstractAsyncHttpRequestFactoryTestCase {
-
+
@Override
protected AsyncClientHttpRequestFactory createRequestFactory() {
return new OkHttpClientHttpRequestFactory(); | true |
Other | spring-projects | spring-framework | 61824b1aded8f975f3e02e0b1a7ace63a993a6fb.json | Remove trailing whitespace from source code | spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java | @@ -147,7 +147,7 @@ public void onCompletionHandler() throws Exception {
}
// SPR-13292
-
+
@Test
public void onCompletionHandlerAfterOnErrorEvent() throws Exception {
Runnable handler = mock(Runnable.class); | true |
Other | spring-projects | spring-framework | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-test/src/test/java/org/springframework/test/web/servlet/samples/context/AsyncControllerJavaConfigTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -23,6 +23,7 @@
import org.junit.Before;
im... | true |
Other | spring-projects | spring-framework | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-test/src/test/java/org/springframework/test/web/servlet/samples/context/PersonController.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2016 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,25 +16,24 @@
package org.springframew... | true |
Other | spring-projects | spring-framework | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-web/src/main/java/org/springframework/web/bind/annotation/DeleteMapping.java | @@ -0,0 +1,72 @@
+/*
+ * Copyright 2002-2016 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 | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-web/src/main/java/org/springframework/web/bind/annotation/GetMapping.java | @@ -0,0 +1,78 @@
+/*
+ * Copyright 2002-2016 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 | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-web/src/main/java/org/springframework/web/bind/annotation/PatchMapping.java | @@ -0,0 +1,78 @@
+/*
+ * Copyright 2002-2016 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 | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-web/src/main/java/org/springframework/web/bind/annotation/PostMapping.java | @@ -0,0 +1,78 @@
+/*
+ * Copyright 2002-2016 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 | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-web/src/main/java/org/springframework/web/bind/annotation/PutMapping.java | @@ -0,0 +1,78 @@
+/*
+ * Copyright 2002-2016 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 | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java | @@ -279,6 +279,11 @@
* @author Arjen Poutsma
* @author Sam Brannen
* @since 2.5
+ * @see GetMapping
+ * @see PostMapping
+ * @see PutMapping
+ * @see DeleteMapping
+ * @see PatchMapping
* @see RequestParam
* @see RequestAttribute
* @see PathVariable | true |
Other | spring-projects | spring-framework | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMappingTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -34,6 +34,11 @@
import org.springframework.... | true |
Other | spring-projects | spring-framework | 467b5f3f2875775781387385173e03821299195f.json | Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.
- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping
Issue: SPR-13992 | src/asciidoc/whats-new.adoc | @@ -630,7 +630,7 @@ public @interface MyTestConfig {
=== Core Container Improvements
* It is no longer necessary to specify the `@Autowired` annotation if the target
- bean only define one constructor.
+ bean only defines one constructor.
* `@Configuration` classes support constructor injection.
* Any SpEL expr... | true |
Other | spring-projects | spring-framework | 5923ee8af39a5a36017e3046146bdf0591ab0f61.json | Add sun.misc annotation marker
This commit adds an annotation that should be used to mark any usage of
the `sun.misc` API. | spring-core/src/main/java/org/springframework/lang/UsesSunMisc.java | @@ -0,0 +1,20 @@
+package org.springframework.lang;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Indicates that the annotated element uses an API ... | false |
Other | spring-projects | spring-framework | b423596b2eee8af7d06237b0ebd05c8dea11e099.json | Introduce composed annotations for web scopes
This commit introduces the following common composed annotations for
web scopes.
- @RequestScope
- @SessionScope
- @ApplicationScope
Issue: SPR-13993 | spring-web/src/main/java/org/springframework/web/context/annotation/ApplicationScope.java | @@ -0,0 +1,66 @@
+/*
+ * Copyright 2002-2016 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 | b423596b2eee8af7d06237b0ebd05c8dea11e099.json | Introduce composed annotations for web scopes
This commit introduces the following common composed annotations for
web scopes.
- @RequestScope
- @SessionScope
- @ApplicationScope
Issue: SPR-13993 | spring-web/src/main/java/org/springframework/web/context/annotation/RequestScope.java | @@ -0,0 +1,66 @@
+/*
+ * Copyright 2002-2016 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 | b423596b2eee8af7d06237b0ebd05c8dea11e099.json | Introduce composed annotations for web scopes
This commit introduces the following common composed annotations for
web scopes.
- @RequestScope
- @SessionScope
- @ApplicationScope
Issue: SPR-13993 | spring-web/src/main/java/org/springframework/web/context/annotation/SessionScope.java | @@ -0,0 +1,66 @@
+/*
+ * Copyright 2002-2016 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 | b423596b2eee8af7d06237b0ebd05c8dea11e099.json | Introduce composed annotations for web scopes
This commit introduces the following common composed annotations for
web scopes.
- @RequestScope
- @SessionScope
- @ApplicationScope
Issue: SPR-13993 | src/asciidoc/whats-new.adoc | @@ -662,10 +662,11 @@ Spring 4.3 also improves the caching abstraction as follows:
=== Web Improvements
* Built-in support for <<mvc-ann-requestmapping-head-options,HTTP HEAD and HTTP OPTIONS>>.
+* New `@RequestScope`, `@SessionScope`, and `@ApplicationScope` _composed annotations_ for web scopes.
* New `@RestCont... | true |
Other | spring-projects | spring-framework | b423596b2eee8af7d06237b0ebd05c8dea11e099.json | Introduce composed annotations for web scopes
This commit introduces the following common composed annotations for
web scopes.
- @RequestScope
- @SessionScope
- @ApplicationScope
Issue: SPR-13993 | src/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2016 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,50 +17,50 @@
package org.springframewor... | true |
Other | spring-projects | spring-framework | df7b24b8e771abbbebdb034fb436d37812329689.json | Allow non-public @Transactional test methods
Prior to this commit, the TransactionalTestExecutionListener required
@Transactional test methods to be public; however, neither TestNG nor
JUnit 5 require that @Test methods are public. Consequently, non-public
transactional test methods silently run *without* a transactio... | spring-test/src/main/java/org/springframework/test/context/transaction/TransactionalTestExecutionListener.java | @@ -136,7 +136,8 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
@SuppressWarnings("deprecation")
private static final TransactionConfigurationAttributes defaultTxConfigAttributes = new TransactionConfigurationAttributes();
- protected final TransactionAttributeSource attribute... | true |
Other | spring-projects | spring-framework | df7b24b8e771abbbebdb034fb436d37812329689.json | Allow non-public @Transactional test methods
Prior to this commit, the TransactionalTestExecutionListener required
@Transactional test methods to be public; however, neither TestNG nor
JUnit 5 require that @Test methods are public. Consequently, non-public
transactional test methods silently run *without* a transactio... | spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java | @@ -135,7 +135,7 @@ void setUp() throws Exception {
}
@Test
- public void modifyTestDataWithinTransaction() {
+ void modifyTestDataWithinTransaction() {
assertInTransaction(true);
assertAddPerson(JANE);
assertAddPerson(SUE); | true |
Other | spring-projects | spring-framework | df7b24b8e771abbbebdb034fb436d37812329689.json | Allow non-public @Transactional test methods
Prior to this commit, the TransactionalTestExecutionListener required
@Transactional test methods to be public; however, neither TestNG nor
JUnit 5 require that @Test methods are public. Consequently, non-public
transactional test methods silently run *without* a transactio... | spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java | @@ -205,7 +205,7 @@ void setUp() throws Exception {
}
@Test
- public void modifyTestDataWithinTransaction() {
+ void modifyTestDataWithinTransaction() {
assertInTransaction(true);
assertAddPerson(JANE);
assertAddPerson(SUE); | true |
Other | spring-projects | spring-framework | 33c5a197698fdd87ff9edcafdf77d3993e35ae98.json | Handle unresolved view name | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandler.java | @@ -151,6 +151,7 @@ else if (returnValue instanceof CharSequence) {
return Flux.fromIterable(getViewResolvers())
.concatMap(resolver -> resolver.resolveViewName(viewName, locale))
.next()
+ .otherwiseIfEmpty(handleUnresolvedViewName(viewName))
.then(view -> {
Flux<DataBuffer> body... | true |
Other | spring-projects | spring-framework | 33c5a197698fdd87ff9edcafdf77d3993e35ae98.json | Handle unresolved view name | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java | @@ -154,9 +154,8 @@ public void viewNameWithMultipleResolvers() throws Exception {
@Test
public void viewNameUnresolved() throws Exception {
- TestSubscriber<Void> subscriber = handle("/path", "account", ResolvableType.forClass(String.class));
-
- subscriber.assertNoValues();
+ handle("/path", "account", Resol... | true |
Other | spring-projects | spring-framework | f7d4688b8457f9ce3527dc70cb69c3fe3f7762a2.json | Improve 404 "handler not found" handling
Remove handler inserted at the end to generate error in favor of doing
the same using the otherwiseIfEmpty operator. | spring-web-reactive/src/main/java/org/springframework/web/reactive/DispatcherHandler.java | @@ -58,6 +58,10 @@ public class DispatcherHandler implements WebHandler, ApplicationContextAware {
private static final Log logger = LogFactory.getLog(DispatcherHandler.class);
+ @SuppressWarnings("ThrowableInstanceNeverThrown")
+ private static final Exception HANDLER_NOT_FOUND_EXCEPTION =
+ new ResponseStatus... | false |
Other | spring-projects | spring-framework | 31a93792b27be268255cb4aba3c8ab6e4e4db7ff.json | Delete unused imports | spring-test/src/test/java/org/springframework/test/web/client/MockRestServiceServerTests.java | @@ -15,14 +15,11 @@
*/
package org.springframework.test.web.client;
-import org.hamcrest.Matchers;
import org.junit.Test;
import org.springframework.test.web.client.MockRestServiceServer.MockRestServiceServerBuilder;
import org.springframework.web.client.RestTemplate;
-import static org.junit.Assert.assertT... | false |
Other | spring-projects | spring-framework | c6ed12297f284ef8b7385683fe40e1faf4d0ef95.json | Add Host property in HttpServerSupport
And change the defaults to:
* "0.0.0.0" for the host
* any available port, starting at 8080 | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/HttpServer.java | @@ -26,6 +26,8 @@
*/
public interface HttpServer extends InitializingBean, Lifecycle {
+ void setHost(String host);
+
void setPort(int port);
void setHandler(HttpHandler handler); | true |
Other | spring-projects | spring-framework | c6ed12297f284ef8b7385683fe40e1faf4d0ef95.json | Add Host property in HttpServerSupport
And change the defaults to:
* "0.0.0.0" for the host
* any available port, starting at 8080 | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/HttpServerSupport.java | @@ -17,23 +17,37 @@
package org.springframework.http.server.reactive.boot;
+import org.springframework.beans.factory.InitializingBean;
import org.springframework.http.server.reactive.HttpHandler;
+import org.springframework.util.SocketUtils;
/**
* @author Rossen Stoyanchev
*/
public class HttpServerSuppor... | true |
Other | spring-projects | spring-framework | c6ed12297f284ef8b7385683fe40e1faf4d0ef95.json | Add Host property in HttpServerSupport
And change the defaults to:
* "0.0.0.0" for the host
* any available port, starting at 8080 | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/JettyHttpServer.java | @@ -24,7 +24,6 @@
import org.springframework.beans.factory.InitializingBean;
import org.springframework.http.server.reactive.ServletHttpHandlerAdapter;
import org.springframework.util.Assert;
-import org.springframework.util.SocketUtils;
/**
* @author Rossen Stoyanchev
@@ -44,10 +43,6 @@ public boolean isRunnin... | true |
Other | spring-projects | spring-framework | c6ed12297f284ef8b7385683fe40e1faf4d0ef95.json | Add Host property in HttpServerSupport
And change the defaults to:
* "0.0.0.0" for the host
* any available port, starting at 8080 | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/ReactorHttpServer.java | @@ -39,9 +39,7 @@ public void afterPropertiesSet() throws Exception {
Assert.notNull(getHttpHandler());
this.reactorHandler = new ReactorHttpHandlerAdapter(getHttpHandler());
-
- this.reactorServer = (getPort() != -1 ? reactor.io.netty.http.HttpServer.create(getPort()) :
- reactor.io.netty.http.HttpServer.c... | true |
Other | spring-projects | spring-framework | c6ed12297f284ef8b7385683fe40e1faf4d0ef95.json | Add Host property in HttpServerSupport
And change the defaults to:
* "0.0.0.0" for the host
* any available port, starting at 8080 | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/RxNettyHttpServer.java | @@ -16,6 +16,8 @@
package org.springframework.http.server.reactive.boot;
+import java.net.InetSocketAddress;
+
import io.netty.buffer.ByteBuf;
import org.springframework.http.server.reactive.RxNettyHttpHandlerAdapter;
@@ -38,9 +40,8 @@ public void afterPropertiesSet() throws Exception {
Assert.notNull(getHt... | true |
Other | spring-projects | spring-framework | c6ed12297f284ef8b7385683fe40e1faf4d0ef95.json | Add Host property in HttpServerSupport
And change the defaults to:
* "0.0.0.0" for the host
* any available port, starting at 8080 | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/TomcatHttpServer.java | @@ -20,6 +20,7 @@
import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
+import org.apache.catalina.core.StandardHost;
import org.apache.catalina.startup.Tomcat;
import org.springframework.beans.factory.InitializingBean;
@@ -46,11 +47,8 @@ public boolean isRunning() {
@Override
... | true |
Other | spring-projects | spring-framework | c6ed12297f284ef8b7385683fe40e1faf4d0ef95.json | Add Host property in HttpServerSupport
And change the defaults to:
* "0.0.0.0" for the host
* any available port, starting at 8080 | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/UndertowHttpServer.java | @@ -44,8 +44,7 @@ public void afterPropertiesSet() throws Exception {
Assert.notNull(getHttpHandler());
HttpHandler handler =
new UndertowHttpHandlerAdapter(getHttpHandler(), dataBufferFactory);
- int port = (getPort() != -1 ? getPort() : 8080);
- this.server = Undertow.builder().addHttpListener(port, "loc... | true |
Other | spring-projects | spring-framework | 8b99c51969ab8f2354685956fb5724fbc4de72d0.json | Fix compiler warnings | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMethodArgumentResolverTests.java | @@ -80,7 +80,7 @@ public void setUp() throws Exception {
this.resolver = new RequestHeaderMethodArgumentResolver(conversionService, context.getBeanFactory());
@SuppressWarnings("ConfusingArgumentToVarargsMethod")
- Method method = ReflectionUtils.findMethod(getClass(), "params", null);
+ Method method = Refle... | false |
Other | spring-projects | spring-framework | bc782902d7e6b6abeb8041d620f0a7b7657496b5.json | Remove java.util.Optional from View contract | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/AbstractView.java | @@ -114,15 +114,15 @@ public ApplicationContext getApplicationContext() {
* @return
*/
@Override
- public Flux<DataBuffer> render(HandlerResult result, Optional<MediaType> contentType,
+ public Flux<DataBuffer> render(HandlerResult result, MediaType contentType,
ServerWebExchange exchange) {
if (logger... | true |
Other | spring-projects | spring-framework | bc782902d7e6b6abeb8041d620f0a7b7657496b5.json | Remove java.util.Optional from View contract | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/View.java | @@ -55,6 +55,6 @@ public interface View {
* @param exchange the current exchange
* @return the output stream
*/
- Flux<DataBuffer> render(HandlerResult result, Optional<MediaType> contentType, ServerWebExchange exchange);
+ Flux<DataBuffer> render(HandlerResult result, MediaType contentType, ServerWebExchange ... | true |
Other | spring-projects | spring-framework | bc782902d7e6b6abeb8041d620f0a7b7657496b5.json | Remove java.util.Optional from View contract | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/view/ViewResolverResultHandler.java | @@ -121,7 +121,7 @@ else if (result.getReturnValue().isPresent()) {
return returnValueMono.then(returnValue -> {
if (returnValue instanceof View) {
- Flux<DataBuffer> body = ((View) returnValue).render(result, Optional.empty(), exchange);
+ Flux<DataBuffer> body = ((View) returnValue).render(result, null... | true |
Other | spring-projects | spring-framework | bc782902d7e6b6abeb8041d620f0a7b7657496b5.json | Remove java.util.Optional from View contract | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/ViewResolverResultHandlerTests.java | @@ -277,9 +277,7 @@ public List<MediaType> getSupportedMediaTypes() {
}
@Override
- public Flux<DataBuffer> render(HandlerResult result, Optional<MediaType> contentType,
- ServerWebExchange exchange) {
-
+ public Flux<DataBuffer> render(HandlerResult result, MediaType mediaType, ServerWebExchange exchange)... | true |
Other | spring-projects | spring-framework | bc782902d7e6b6abeb8041d620f0a7b7657496b5.json | Remove java.util.Optional from View contract | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerViewTests.java | @@ -127,7 +127,7 @@ public void render() throws Exception {
ModelMap model = new ExtendedModelMap();
model.addAttribute("hello", "hi FreeMarker");
HandlerResult result = new HandlerResult(new Object(), "", ResolvableType.NONE, model);
- Flux<DataBuffer> flux = view.render(result, Optional.empty(), this.exchan... | true |
Other | spring-projects | spring-framework | 4e8754ea87c1f52c589049eb123cc5e0e897639f.json | Add reset() to MockRestServiceServer
Issue: SPR-14306 | spring-test/src/main/java/org/springframework/test/web/client/AbstractRequestExpectationManager.java | @@ -133,6 +133,12 @@ protected AssertionError createUnexpectedRequestError(ClientHttpRequest request)
return new AssertionError(message + getRequestDetails());
}
+ @Override
+ public void reset() {
+ this.expectations.clear();
+ this.requests.clear();
+ }
+
/**
* Helper class to manage a group of reques... | true |
Other | spring-projects | spring-framework | 4e8754ea87c1f52c589049eb123cc5e0e897639f.json | Add reset() to MockRestServiceServer
Issue: SPR-14306 | spring-test/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java | @@ -121,6 +121,13 @@ public void verify() {
this.expectationManager.verify();
}
+ /**
+ * Reset the internal state removing all expectations and recorded requests.
+ */
+ public void reset() {
+ this.expectationManager.reset();
+ }
+
/**
* Return a builder for a {@code MockRestServiceServer} that shoul... | true |
Other | spring-projects | spring-framework | 4e8754ea87c1f52c589049eb123cc5e0e897639f.json | Add reset() to MockRestServiceServer
Issue: SPR-14306 | spring-test/src/main/java/org/springframework/test/web/client/RequestExpectationManager.java | @@ -54,4 +54,9 @@ public interface RequestExpectationManager {
*/
void verify();
+ /**
+ * Reset the internal state removing all expectations and recorded requests.
+ */
+ void reset();
+
} | true |
Other | spring-projects | spring-framework | 4e8754ea87c1f52c589049eb123cc5e0e897639f.json | Add reset() to MockRestServiceServer
Issue: SPR-14306 | spring-test/src/main/java/org/springframework/test/web/client/SimpleRequestExpectationManager.java | @@ -71,4 +71,10 @@ private RequestExpectation next(ClientHttpRequest request) {
throw createUnexpectedRequestError(request);
}
+ @Override
+ public void reset() {
+ super.reset();
+ this.expectationIterator = null;
+ this.repeatExpectations.reset();
+ }
} | true |
Other | spring-projects | spring-framework | 4e8754ea87c1f52c589049eb123cc5e0e897639f.json | Add reset() to MockRestServiceServer
Issue: SPR-14306 | spring-test/src/main/java/org/springframework/test/web/client/UnorderedRequestExpectationManager.java | @@ -48,4 +48,10 @@ public ClientHttpResponse validateRequestInternal(ClientHttpRequest request) thr
throw createUnexpectedRequestError(request);
}
+ @Override
+ public void reset() {
+ super.reset();
+ this.remainingExpectations.reset();
+ }
+
} | true |
Other | spring-projects | spring-framework | 4e8754ea87c1f52c589049eb123cc5e0e897639f.json | Add reset() to MockRestServiceServer
Issue: SPR-14306 | spring-test/src/test/java/org/springframework/test/web/client/MockRestServiceServerTests.java | @@ -15,11 +15,14 @@
*/
package org.springframework.test.web.client;
+import org.hamcrest.Matchers;
import org.junit.Test;
import org.springframework.test.web.client.MockRestServiceServer.MockRestServiceServerBuilder;
import org.springframework.web.client.RestTemplate;
+import static org.junit.Assert.assertT... | true |
Other | spring-projects | spring-framework | 37404d081e807c1f4926590a78f1d4da266fb5c3.json | Use ContentTypeResolver for content negotiation | spring-web-reactive/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandler.java | @@ -42,6 +42,8 @@
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.reactive.HandlerResult;
import org.springframework.web.reactive.HandlerResultHandler;
+import org.springframework.web.reactive.accept.ContentTypeResolver;
+import org.springframework.web.reactive.accept.HeaderConten... | true |
Other | spring-projects | spring-framework | 37404d081e807c1f4926590a78f1d4da266fb5c3.json | Use ContentTypeResolver for content negotiation | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java | @@ -406,14 +406,11 @@ public ConversionService conversionService() {
@Bean
public ResponseBodyResultHandler responseBodyResultHandler() {
- List<HttpMessageConverter<?>> converters =
- Arrays.asList(new ResourceHttpMessageConverter(),
- new CodecHttpMessageConverter<ByteBuffer>(
- new ByteBu... | true |
Other | spring-projects | spring-framework | 37404d081e807c1f4926590a78f1d4da266fb5c3.json | Use ContentTypeResolver for content negotiation | spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java | @@ -16,6 +16,8 @@
package org.springframework.web.reactive.result.method.annotation;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@@ -25,23 +27,36 @@
import org.springframework.core.ResolvableType;
import org.s... | true |
Other | spring-projects | spring-framework | da3b21b020b4a5a733196b54ca1ae218f27fe741.json | Fix typo in build script | spring-web-reactive/build.gradle | @@ -97,7 +97,7 @@ dependencies {
compile "commons-logging:commons-logging:1.2"
optional "org.springframework:spring-context-support:${springVersion}" // for FreeMarker
- optional 'io.reactivex:rxjava:${rxJavaVersion}'
+ optional "io.reactivex:rxjava:${rxJavaVersion}"
optional ("io.reactivex:rxnetty-http:0.5.2-S... | false |
Other | spring-projects | spring-framework | 7d4d3db0ddd90fe70fd305b27410124301da1b45.json | Add alternative database name for HANA
Issue: SPR-14261 | spring-jdbc/src/main/resources/org/springframework/jdbc/support/sql-error-codes.xml | @@ -250,8 +250,11 @@
<!-- http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a78d3275191014b41bae7c4a46d835/content.htm -->
<bean id="Hana" class="org.springframework.jdbc.support.SQLErrorCodes">
- <property name="databaseProductName">
- <value>SAP DB</value>
+ <property name="databaseProductNames">
+ ... | false |
Other | spring-projects | spring-framework | 1e003a1c90fe7f5aa91f99a34fa5be53a43ad6d8.json | Remove unnecessary assertion
Issue: SPR-14279 | spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -223,12 +223,6 @@ protected void handleMessa... | false |
Other | spring-projects | spring-framework | 59217243ee572a38635de9756485750ccd1ffd36.json | Add viewNames for UrlBasedViewResolver | spring-web-reactive/src/main/java/org/springframework/web/reactive/view/UrlBasedViewResolver.java | @@ -21,6 +21,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.InitializingBean;
+import org.springframework.util.PatternMatchUtils;
import org.springframework.web.reactive.View;
@@ -61,6 +62,8 @@ public class UrlBasedViewResolver extends ViewResolverSupport implements I... | true |
Other | spring-projects | spring-framework | 59217243ee572a38635de9756485750ccd1ffd36.json | Add viewNames for UrlBasedViewResolver | spring-web-reactive/src/test/java/org/springframework/web/reactive/view/UrlBasedViewResolverTests.java | @@ -0,0 +1,72 @@
+/*
+ * Copyright 2002-2016 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 | 2367f52aafc224f1c0a89ac6c63712b3d767c788.json | Remove potential XSS attack in Freemarker example
Since the user controls the value of `spring.status.value`, you wouldn't want to echo unescaped values here in this form. Otherwise one could submit a value of, say, `"/> <script>alert("pwned")</script>`. | src/asciidoc/web-view.adoc | @@ -331,7 +331,7 @@ Example code is shown below for the `personFormV`/`personFormF` views configured
<@spring.bind "myModelObject.name"/>
<input type="text"
name="${spring.status.expression}"
- value="${spring.status.value?default("")}"/><br>
+ value="${spring.status.value?html}"/><br>
<#list spr... | false |
Other | spring-projects | spring-framework | 3c92ddc94b04f1dc057125d336e5220c92351442.json | Fix path matching for paths containing spaces
Prior to this commit, the latest optimizations introduced in SPR-13913
would prevent matching when patterns contained spaces. Indeed, the
optimized path would not fully tokenize the paths nor trim the tokens,
as the "longer" code path does.
This commit disables this optim... | spring-core/src/main/java/org/springframework/util/AntPathMatcher.java | @@ -83,7 +83,7 @@ public class AntPathMatcher implements PathMatcher {
private boolean caseSensitive = true;
- private boolean trimTokens = true;
+ private boolean trimTokens = false;
private volatile Boolean cachePatterns;
@@ -314,19 +314,21 @@ else if (!fullMatch && "**".equals(pattDirs[pattIdxStart])) {
... | true |
Other | spring-projects | spring-framework | 3c92ddc94b04f1dc057125d336e5220c92351442.json | Fix path matching for paths containing spaces
Prior to this commit, the latest optimizations introduced in SPR-13913
would prevent matching when patterns contained spaces. Indeed, the
optimized path would not fully tokenize the paths nor trim the tokens,
as the "longer" code path does.
This commit disables this optim... | spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java | @@ -136,6 +136,14 @@ public void match() {
assertTrue(pathMatcher.match("/{bla}.*", "/testing.html"));
}
+ // SPR-14247
+ @Test
+ public void matchWithTrimTokensEnabled() throws Exception {
+ pathMatcher.setTrimTokens(true);
+
+ assertTrue(pathMatcher.match("/foo/bar", "/foo /bar"));
+ }
+
@Test
public voi... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/ResponseCookie.java | @@ -150,6 +150,12 @@ public ResponseCookieBuilder maxAge(Duration maxAge) {
return this;
}
+ @Override
+ public ResponseCookieBuilder maxAge(long maxAgeSeconds) {
+ this.maxAge = maxAgeSeconds >= 0 ? Duration.ofSeconds(maxAgeSeconds) : Duration.ofSeconds(-1);
+ return this;
+ }
+
@Override
... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/client/reactive/AbstractClientHttpRequest.java | @@ -23,8 +23,12 @@
import reactor.core.publisher.Mono;
+import org.springframework.http.HttpCookie;
import org.springframework.http.HttpHeaders;
import org.springframework.util.Assert;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframew... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ClientHttpRequest.java | @@ -20,8 +20,10 @@
import reactor.core.publisher.Mono;
+import org.springframework.http.HttpCookie;
import org.springframework.http.HttpMethod;
import org.springframework.http.ReactiveHttpOutputMessage;
+import org.springframework.util.MultiValueMap;
/**
* Represents a reactive client-side HTTP request.
@@ ... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ClientHttpResponse.java | @@ -18,6 +18,8 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.ReactiveHttpInputMessage;
+import org.springframework.http.ResponseCookie;
+import org.springframework.util.MultiValueMap;
/**
* Represents a reactive client-side HTTP response.
@@ -31,4 +33,9 @@ public interface Clie... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpRequest.java | @@ -17,16 +17,19 @@
package org.springframework.http.client.reactive;
import java.net.URI;
+import java.util.Collection;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.io.buffer.Buffer;
import reactor.io.netty.http.HttpClient;
+imp... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java | @@ -17,6 +17,7 @@
package org.springframework.http.client.reactive;
import java.nio.ByteBuffer;
+import java.util.Collection;
import reactor.core.publisher.Flux;
import reactor.io.buffer.Buffer;
@@ -26,6 +27,10 @@
import org.springframework.core.io.buffer.DataBufferAllocator;
import org.springframework.http.H... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/client/reactive/RxNettyClientHttpRequest.java | @@ -17,10 +17,12 @@
package org.springframework.http.client.reactive;
import java.net.URI;
+import java.util.Collection;
import java.util.List;
import java.util.Map;
import io.netty.buffer.ByteBuf;
+import io.netty.handler.codec.http.cookie.DefaultCookie;
import io.reactivex.netty.protocol.http.client.HttpCli... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/client/reactive/RxNettyClientHttpResponse.java | @@ -16,6 +16,8 @@
package org.springframework.http.client.reactive;
+import java.util.Collection;
+
import io.netty.buffer.ByteBuf;
import io.reactivex.netty.protocol.http.client.HttpClientResponse;
import reactor.core.converter.RxJava1ObservableConverter;
@@ -25,7 +27,11 @@
import org.springframework.core.io.... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/main/java/org/springframework/http/server/reactive/ServerHttpResponse.java | @@ -37,7 +37,7 @@ public interface ServerHttpResponse extends ReactiveHttpOutputMessage {
void setStatusCode(HttpStatus status);
/**
- * Return a mutable map with cookies to be sent to the client.
+ * Return a mutable map with the cookies to send to the server.
*/
MultiValueMap<String, ResponseCookie> getC... | true |
Other | spring-projects | spring-framework | 72dbe9012e00a29b03b925612766bc928b705e8e.json | Add cookies to ClientHttpRequest/Response | spring-web-reactive/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java | @@ -103,7 +103,7 @@ public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response)
this.requestCookies.size(); // Cause lazy loading
response.getCookies().add("SID", ResponseCookie.from("SID", "31d4d96e407aad42")
- .path("/").secure().httpOnly().build());
+ .path("/").secure(true).ht... | true |
Other | spring-projects | spring-framework | 62753102dcc3acfc1bd5053b59163859aa2fed00.json | Ensure a consistent netty version
Currently there are clashes between io.netty:netty-common:4.1.0.Beta7 and
io.netty:netty-all:4.1.0.CR3 which can cause errors in the build related
to "VerifyError: Bad type on operand stack".
One solution would be to exclude the jars that duplicate the classes.
However, this can be f... | spring-web-reactive/build.gradle | @@ -26,17 +26,13 @@ repositories {
maven { url 'http://repo.spring.io/snapshot' } // Reactor snapshot
}
-configurations.all {
- // check for updates every build
- resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
-}
-
ext {
springVersion = '4.2.3.RELEASE'
reactorVersion = '2.5.0.M2'
reactorNettyVers... | false |
Other | spring-projects | spring-framework | 2d565c7944fbb205ea093302deee336f41b11c29.json | Fix bugs in ReflectionTestUtils related to proxies
Issue: SPR-14050 | spring-test/src/main/java/org/springframework/test/util/ReflectionTestUtils.java | @@ -160,7 +160,8 @@ public static void setField(Object targetObject, Class<?> targetClass, String na
Assert.isTrue(targetObject != null || targetClass != null,
"Either targetObject or targetClass for the field must be specified");
- Object ultimateTargetObject = AopTestUtils.getUltimateTargetObject(targetObje... | false |
Other | spring-projects | spring-framework | 1a302e1fac95774717673aa1036132aa2ee60e89.json | Add converters between Enum and Integer | spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java | @@ -142,6 +142,9 @@ private static void addScalarConverters(ConverterRegistry converterRegistry) {
converterRegistry.addConverterFactory(new StringToEnumConverterFactory());
converterRegistry.addConverter(new EnumToStringConverter((ConversionService) converterRegistry));
+
+ converterRegistry.addConverterFac... | true |
Other | spring-projects | spring-framework | 1a302e1fac95774717673aa1036132aa2ee60e89.json | Add converters between Enum and Integer | spring-core/src/main/java/org/springframework/core/convert/support/EnumToIntegerConverter.java | @@ -0,0 +1,57 @@
+/*
+ * Copyright 2002-2016 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 | 1a302e1fac95774717673aa1036132aa2ee60e89.json | Add converters between Enum and Integer | spring-core/src/main/java/org/springframework/core/convert/support/IntegerToEnumConverterFactory.java | @@ -0,0 +1,62 @@
+/*
+ * Copyright 2002-2016 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 | 1a302e1fac95774717673aa1036132aa2ee60e89.json | Add converters between Enum and Integer | spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java | @@ -243,6 +243,26 @@ public void testStringToEnumEmptyString() {
public void testEnumToString() {
assertEquals("BAR", conversionService.convert(Foo.BAR, String.class));
}
+
+ @Test
+ public void testIntegerToEnum() throws Exception {
+ assertEquals(Foo.BAR, conversionService.convert(0, Foo.class));
+ }
+
+ @T... | true |
Other | spring-projects | spring-framework | 183594207fbb447e1b59262b4469f2aefbb8a3ec.json | Support user destinations without leading slash
Before this commit the DefaultUserDestinationResolver did not support
well broker destinations that use dot as separator with a built in
assumptions that the destinations it resolves must start with slash.
This change adds PathMatcher property that is used to determine ... | spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java | @@ -384,6 +384,7 @@ public UserDestinationResolver userDestinationResolver() {
if (prefix != null) {
resolver.setUserDestinationPrefix(prefix);
}
+ resolver.setPathMatcher(getBrokerRegistry().getPathMatcher());
return resolver;
}
| true |
Other | spring-projects | spring-framework | 183594207fbb447e1b59262b4469f2aefbb8a3ec.json | Support user destinations without leading slash
Before this commit the DefaultUserDestinationResolver did not support
well broker destinations that use dot as separator with a built in
assumptions that the destinations it resolves must start with slash.
This change adds PathMatcher property that is used to determine ... | spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -29,6 +29,7 @@
import org.springframework.m... | true |
Other | spring-projects | spring-framework | 183594207fbb447e1b59262b4469f2aefbb8a3ec.json | Support user destinations without leading slash
Before this commit the DefaultUserDestinationResolver did not support
well broker destinations that use dot as separator with a built in
assumptions that the destinations it resolves must start with slash.
This change adds PathMatcher property that is used to determine ... | spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
import org.hamcrest.Matchers... | true |
Other | spring-projects | spring-framework | 183594207fbb447e1b59262b4469f2aefbb8a3ec.json | Support user destinations without leading slash
Before this commit the DefaultUserDestinationResolver did not support
well broker destinations that use dot as separator with a built in
assumptions that the destinations it resolves must start with slash.
This change adds PathMatcher property that is used to determine ... | spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2015 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -29,6 +29,8 @@
import org.springframework.m... | true |
Other | spring-projects | spring-framework | 183594207fbb447e1b59262b4469f2aefbb8a3ec.json | Support user destinations without leading slash
Before this commit the DefaultUserDestinationResolver did not support
well broker destinations that use dot as separator with a built in
assumptions that the destinations it resolves must start with slash.
This change adds PathMatcher property that is used to determine ... | spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java | @@ -573,6 +573,10 @@ private RuntimeBeanReference registerUserDestResolver(Element brokerElem,
if (brokerElem.hasAttribute("user-destination-prefix")) {
beanDef.getPropertyValues().add("userDestinationPrefix", brokerElem.getAttribute("user-destination-prefix"));
}
+ if (brokerElem.hasAttribute("path-matcher"... | true |
Other | spring-projects | spring-framework | 33a4e9e57f155f13ea51b38f80468ccd759efa1b.json | Prevent non public bean to be exposed to JMX
Previously, a package private `@ManagedResource` annotated bean was
registered to the JMX domain even if any attempt to invoke an operation
on it will fail since it has to be public.
This commit validates that any `@ManagedResource` annotated bean is
public and throws an I... | spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java | @@ -19,6 +19,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Array;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.Set;
@@ -40,6 +41,7 @@
* @author Rob Harrop
* @author Juergen Hoeller
* @author Jennifer Hickey
+ * @a... | true |
Other | spring-projects | spring-framework | 33a4e9e57f155f13ea51b38f80468ccd759efa1b.json | Prevent non public bean to be exposed to JMX
Previously, a package private `@ManagedResource` annotated bean was
registered to the JMX domain even if any attempt to invoke an operation
on it will fail since it has to be public.
This commit validates that any `@ManagedResource` annotated bean is
public and throws an I... | spring-context/src/test/java/org/springframework/jmx/export/annotation/AnotherAnnotationTestBeanImpl.java | @@ -19,7 +19,7 @@
/**
* @author Stephane Nicoll
*/
-class AnotherAnnotationTestBeanImpl implements AnotherAnnotationTestBean {
+public class AnotherAnnotationTestBeanImpl implements AnotherAnnotationTestBean {
private String bar;
| true |
Other | spring-projects | spring-framework | 33a4e9e57f155f13ea51b38f80468ccd759efa1b.json | Prevent non public bean to be exposed to JMX
Previously, a package private `@ManagedResource` annotated bean was
registered to the JMX domain even if any attempt to invoke an operation
on it will fail since it has to be public.
This commit validates that any `@ManagedResource` annotated bean is
public and throws an I... | spring-context/src/test/java/org/springframework/jmx/export/annotation/EnableMBeanExportConfigurationTests.java | @@ -19,7 +19,10 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
+import org.junit.After;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframewor... | true |
Other | spring-projects | spring-framework | 33a4e9e57f155f13ea51b38f80468ccd759efa1b.json | Prevent non public bean to be exposed to JMX
Previously, a package private `@ManagedResource` annotated bean was
registered to the JMX domain even if any attempt to invoke an operation
on it will fail since it has to be public.
This commit validates that any `@ManagedResource` annotated bean is
public and throws an I... | src/asciidoc/integration.adoc | @@ -3508,6 +3508,9 @@ be marked with the `ManagedAttribute` annotation. When marking properties you ca
either the annotation of the getter or the setter to create a write-only or read-only
attribute respectively.
+NOTE: A `ManagedResource` annotated bean must be public as well as the methods exposing
+an operation ... | true |
Other | spring-projects | spring-framework | 582864802e49f0cc47575be00194e4194d7b1dc5.json | Ensure RedirectModel is initialized
This commit fixes an old bug in ModelAndViewContainer where getModel
returns a new ModelMap instance that isn't saved and re-used.
Issue: SPR-14045 | spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java | @@ -134,7 +134,10 @@ public ModelMap getModel() {
return this.defaultModel;
}
else {
- return (this.redirectModel != null) ? this.redirectModel : new ModelMap();
+ if (this.redirectModel == null) {
+ this.redirectModel = new ModelMap();
+ }
+ return this.redirectModel;
}
}
| true |
Other | spring-projects | spring-framework | 582864802e49f0cc47575be00194e4194d7b1dc5.json | Ensure RedirectModel is initialized
This commit fixes an old bug in ModelAndViewContainer where getModel
returns a new ModelMap instance that isn't saved and re-used.
Issue: SPR-14045 | spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -76,4 +76,15 @@ public void ignoreDefaultMod... | true |
Other | spring-projects | spring-framework | 582864802e49f0cc47575be00194e4194d7b1dc5.json | Ensure RedirectModel is initialized
This commit fixes an old bug in ModelAndViewContainer where getModel
returns a new ModelMap instance that isn't saved and re-used.
Issue: SPR-14045 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandlerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -143,6 +143,20 @@ public void handleRedirect... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.