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
584b831bb9390a49c791d180d023e3a585203215.json
Allow HTTP delete with request entity Issue: SPR-12361
spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java
@@ -199,7 +199,8 @@ protected void prepareConnection(HttpURLConnection connection, String httpMethod else { connection.setInstanceFollowRedirects(false); } - if ("PUT".equals(httpMethod) || "POST".equals(httpMethod) || "PATCH".equals(httpMethod)) { + if ("PUT".equals(httpMethod) || "POST".equals(httpMethod)...
true
Other
spring-projects
spring-framework
584b831bb9390a49c791d180d023e3a585203215.json
Allow HTTP delete with request entity Issue: SPR-12361
spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 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,10 +16,14 @@ package org.springframew...
true
Other
spring-projects
spring-framework
584b831bb9390a49c791d180d023e3a585203215.json
Allow HTTP delete with request entity Issue: SPR-12361
spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java
@@ -16,20 +16,23 @@ package org.springframework.http.client; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.net.URI; +import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.client.HttpClie...
true
Other
spring-projects
spring-framework
e1207571fc7ccd26e2dbafa4a4f0d5b78cb12104.json
Add Netty version property to build.gradle Issue: SPR-12381
build.gradle
@@ -43,6 +43,7 @@ configure(allprojects) { project -> ext.jettyVersion = "9.2.3.v20140905" ext.jodaVersion = "2.5" ext.junitVersion = "4.11" + ext.nettyVersion = "4.0.23.Final" ext.openJpaVersion = "2.2.2" // 2.3.0 not Java 8 compatible (based on ASM 4) ext.protobufVers...
false
Other
spring-projects
spring-framework
1708a8a10d17b9c3dc203b90f181c1d55ad5facb.json
Remove unnecessary null check Issue: SPR-12378
spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
@@ -814,8 +814,7 @@ else if (value instanceof Map) { Class<?> mapKeyType = GenericCollectionTypeResolver.getMapKeyReturnType(pd.getReadMethod(), i + 1); // IMPORTANT: Do not pass full property name in here - property editors // must not kick in for map keys but rather only for map values. - Ty...
false
Other
spring-projects
spring-framework
6fb31903536c0a41dd4fbe153c81494ccfd4d405.json
Fix regression with binding and validation Previously, the binding may have to call the getter first to retrieve the old value of a property before actually setting it. This was guarded by a catch block that was accidentally removed in 3d86f15 Restore that catch block and add a test to cover it. Issue: SPR-12805
spring-beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java
@@ -20,6 +20,7 @@ import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.UndeclaredThrowableException; +import java.security.PrivilegedActionException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -523,7 +524,18 @@ else ...
true
Other
spring-projects
spring-framework
6fb31903536c0a41dd4fbe153c81494ccfd4d405.json
Fix regression with binding and validation Previously, the binding may have to call the getter first to retrieve the old value of a property before actually setting it. This was guarded by a catch block that was accidentally removed in 3d86f15 Restore that catch block and add a test to cover it. Issue: SPR-12805
spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java
@@ -51,6 +51,15 @@ public void setterDoestNotCallGetter() { assertTrue("Set name to tom", target.getName().equals("tom")); } + @Test + public void getterSilentlyFailWithOldValueExtraction() { + GetterBean target = new GetterBean(); + BeanWrapper accessor = createAccessor(target); + accessor.setExtractOldValue...
true
Other
spring-projects
spring-framework
2ab34373d17c251b0ee89d4fa4537998164413c6.json
Add possible matches for field access DirectFieldAccessor now support richer NotWritablePropertyException content, including dedicated error message and possible matches. Issue: SPR-13053
spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java
@@ -76,9 +76,10 @@ protected DirectFieldAccessor newNestedPropertyAccessor(Object object, String ne @Override protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) { + PropertyMatches matches = PropertyMatches.forField(propertyName, getRootClass()); throw new NotWritab...
true
Other
spring-projects
spring-framework
2ab34373d17c251b0ee89d4fa4537998164413c6.json
Add possible matches for field access DirectFieldAccessor now support richer NotWritablePropertyException content, including dedicated error message and possible matches. Issue: SPR-13053
spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 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,11 +17,13 @@ package org.springframewor...
true
Other
spring-projects
spring-framework
2ab34373d17c251b0ee89d4fa4537998164413c6.json
Add possible matches for field access DirectFieldAccessor now support richer NotWritablePropertyException content, including dedicated error message and possible matches. Issue: SPR-13053
spring-beans/src/test/java/org/springframework/beans/AbstractConfigurablePropertyAccessorTests.java
@@ -1478,6 +1478,23 @@ public void setUnknownProperty() { Simple target = new Simple("John", 2); AbstractPropertyAccessor accessor = createAccessor(target); + try { + accessor.setPropertyValue("name1", "value"); + fail("Should have failed to set an unknown property."); + } + catch (NotWritablePropertyExc...
true
Other
spring-projects
spring-framework
2ab34373d17c251b0ee89d4fa4537998164413c6.json
Add possible matches for field access DirectFieldAccessor now support richer NotWritablePropertyException content, including dedicated error message and possible matches. Issue: SPR-13053
spring-beans/src/test/java/org/springframework/beans/PropertyMatchesTests.java
@@ -0,0 +1,192 @@ +/* + * Copyright 2002-2015 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
4d5fca596dfe193556ad7148d16aae718805a84d.json
Fix directories I/O in ResourceHttpRequestHandler Prior to this commit, the `ResourceHttpRequestHandler` would not properly handle HTTP requests to **directories contained in JARs**. This would result in HTTP 500 errors, caused by `FileNotFoundException` or `NullPointerException`. This can be tracked to webapp ClassL...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
@@ -16,6 +16,7 @@ package org.springframework.web.servlet.resource; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -432,18 +433,23 @@ protected void setHeaders(HttpServletResponse response, Resource resource, Media * @throws IOEx...
true
Other
spring-projects
spring-framework
4d5fca596dfe193556ad7148d16aae718805a84d.json
Fix directories I/O in ResourceHttpRequestHandler Prior to this commit, the `ResourceHttpRequestHandler` would not properly handle HTTP requests to **directories contained in JARs**. This would result in HTTP 500 errors, caused by `FileNotFoundException` or `NullPointerException`. This can be tracked to webapp ClassL...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandlerTests.java
@@ -17,8 +17,12 @@ package org.springframework.web.servlet.resource; import static org.junit.Assert.*; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.*; +import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; import java.util.ArrayList; i...
true
Other
spring-projects
spring-framework
af67bd944be8aeb247c282b7d7bf0efcf8144d81.json
Add 4.2 section to the reference
src/asciidoc/whats-new.adoc
@@ -336,7 +336,7 @@ method has been added. support (based on Groovy 2.3). See the `GroovyMarkupConfigurer` and respecitve `ViewResolver` and `View' implementations. -=== WebSocket STOMP Messaging Improvements +=== WebSocket Messaging Improvements * SockJS (Java) client-side support. See `SockJsClient` and cl...
false
Other
spring-projects
spring-framework
1ba0625cd9d9043b3b80a0de872cfbaf3e324467.json
Add baseUrl to DefaultUriTemplateHandler Issue: SPR-13035
spring-web/src/main/java/org/springframework/web/util/DefaultUriTemplateHandler.java
@@ -16,9 +16,12 @@ package org.springframework.web.util; import java.net.URI; +import java.net.URISyntaxException; import java.util.List; import java.util.Map; +import org.springframework.util.Assert; + /** * Default implementation of {@link UriTemplateHandler} that relies on * {@link UriComponentsBuilder}...
true
Other
spring-projects
spring-framework
1ba0625cd9d9043b3b80a0de872cfbaf3e324467.json
Add baseUrl to DefaultUriTemplateHandler Issue: SPR-13035
spring-web/src/test/java/org/springframework/web/util/DefaultUriTemplateHandlerTests.java
@@ -39,6 +39,24 @@ public void setUp() throws Exception { } + @Test + public void baseUrl() throws Exception { + this.handler.setBaseUrl("http://localhost:8080"); + URI actual = this.handler.expand("/myapiresource"); + + URI expected = new URI("http://localhost:8080/myapiresource"); + assertEquals(expected, a...
true
Other
spring-projects
spring-framework
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
build.gradle
@@ -895,6 +895,7 @@ project("spring-webmvc") { exclude group: "org.slf4j", module: "jcl-over-slf4j" exclude group: "org.springframework", module: "spring-web" } + optional 'org.webjars:webjars-locator:0.22' testCompile(project(":spring-aop")) testCompile("rhino:js:1.7R1") testCompile("xmlunit:xmlun...
true
Other
spring-projects
spring-framework
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.xml.ParserContext; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.core.Ordered; +import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUti...
true
Other
spring-projects
spring-framework
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceChainRegistration.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,13 +22,15 @@ import org.springframework...
true
Other
spring-projects
spring-framework
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java
@@ -0,0 +1,90 @@ +/* + * Copyright 2002-2015 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
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java
@@ -119,6 +119,7 @@ import org.springframework.web.servlet.resource.ResourceUrlProvider; import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor; import org.springframework.web.servlet.resource.VersionResourceResolver; +import org.springframework.web.servlet.resource.WebJarsResourceRes...
true
Other
spring-projects
spring-framework
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java
@@ -40,6 +40,7 @@ import org.springframework.web.servlet.resource.ResourceResolver; import org.springframework.web.servlet.resource.ResourceTransformer; import org.springframework.web.servlet.resource.VersionResourceResolver; +import org.springframework.web.servlet.resource.WebJarsResourceResolver; import static ...
true
Other
spring-projects
spring-framework
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java
@@ -0,0 +1,107 @@ +/* + * Copyright 2002-2015 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
9e5a33c1b36cae7a7541251509bf032455838fdf.json
Add a ResourceResolver implementation for WebJars Prior to this commit, WebJars users needed to use versioned links within templates for WebJars resources, such as `/jquery/1.2.0/jquery.js`. This can be rather cumbersome when updating libraries - all references in templates need to be updated. One could use version-l...
spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/META-INF/resources/webjars/foo/2.3/foo.txt
@@ -0,0 +1 @@ +Some text. \ No newline at end of file
true
Other
spring-projects
spring-framework
876c9694c4f5f01161a311e30c2ac2cdd37d0335.json
Allow use of @JsonView on @MessageMapping methods Issue: SPR-12741
spring-messaging/src/main/java/org/springframework/messaging/converter/AbstractMessageConverter.java
@@ -24,6 +24,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.core.MethodParameter; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.support.MessageBuilder; ...
true
Other
spring-projects
spring-framework
876c9694c4f5f01161a311e30c2ac2cdd37d0335.json
Allow use of @JsonView on @MessageMapping methods Issue: SPR-12741
spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java
@@ -24,6 +24,7 @@ import java.util.Arrays; import java.util.concurrent.atomic.AtomicReference; +import com.fasterxml.jackson.annotation.JsonView; import com.fasterxml.jackson.core.JsonEncoding; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; @@ -33,6 ...
true
Other
spring-projects
spring-framework
876c9694c4f5f01161a311e30c2ac2cdd37d0335.json
Allow use of @JsonView on @MessageMapping methods Issue: SPR-12741
spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandler.java
@@ -25,6 +25,7 @@ import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHeaders; +import org.springframework.messaging.converter.AbstractMessageConverter; import org.springframework.messaging.handler.DestinationPatternsMessageC...
true
Other
spring-projects
spring-framework
876c9694c4f5f01161a311e30c2ac2cdd37d0335.json
Allow use of @JsonView on @MessageMapping methods Issue: SPR-12741
spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandler.java
@@ -22,6 +22,7 @@ import org.springframework.core.MethodParameter; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHeaders; +import org.springframework.messaging.converter.AbstractMessageConverter; import org.springframework.messaging.core.MessageSendingOperations; import ...
true
Other
spring-projects
spring-framework
876c9694c4f5f01161a311e30c2ac2cdd37d0335.json
Allow use of @JsonView on @MessageMapping methods Issue: SPR-12741
spring-messaging/src/test/java/org/springframework/messaging/converter/MappingJackson2MessageConverterTests.java
@@ -17,14 +17,17 @@ package org.springframework.messaging.converter; import java.io.IOException; +import java.lang.reflect.Method; import java.nio.charset.Charset; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import com.fasterxml.jackson.annotation.JsonView; import com.fasterxml....
true
Other
spring-projects
spring-framework
876c9694c4f5f01161a311e30c2ac2cdd37d0335.json
Allow use of @JsonView on @MessageMapping methods Issue: SPR-12741
spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SendToMethodReturnValueHandlerTests.java
@@ -16,13 +16,15 @@ package org.springframework.messaging.simp.annotation.support; +import com.fasterxml.jackson.annotation.JsonView; import static org.junit.Assert.*; import static org.mockito.BDDMockito.*; import static org.springframework.messaging.handler.annotation.support.DestinationVariableMethodArgument...
true
Other
spring-projects
spring-framework
876c9694c4f5f01161a311e30c2ac2cdd37d0335.json
Allow use of @JsonView on @MessageMapping methods Issue: SPR-12741
spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandlerTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 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,8 +18,10 @@ import java.lang.reflect....
true
Other
spring-projects
spring-framework
c36435c0427c75d4dcee382a88a466ad96241faa.json
Execute HandlerInterceptors in registration order Prior to this commit, registering `HandlerInterceptor`s using the `InterceptorRegistry` would not guarantee their order of execution. In fact, `HandlerInterceptor`s would always be executed before `MappedInterceptor`s. This change makes `MappedInterceptor` implement t...
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
@@ -19,7 +19,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -78,9 +77,9 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport private ...
true
Other
spring-projects
spring-framework
c36435c0427c75d4dcee382a88a466ad96241faa.json
Execute HandlerInterceptors in registration order Prior to this commit, registering `HandlerInterceptor`s using the `InterceptorRegistry` would not guarantee their order of execution. In fact, `HandlerInterceptor`s would always be executed before `MappedInterceptor`s. This change makes `MappedInterceptor` implement t...
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/MappedInterceptor.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2015 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,14 +16,18 @@ package org.springframew...
true
Other
spring-projects
spring-framework
c36435c0427c75d4dcee382a88a466ad96241faa.json
Execute HandlerInterceptors in registration order Prior to this commit, registering `HandlerInterceptor`s using the `InterceptorRegistry` would not guarantee their order of execution. In fact, `HandlerInterceptor`s would always be executed before `MappedInterceptor`s. This change makes `MappedInterceptor` implement t...
spring-webmvc/src/test/java/org/springframework/web/servlet/handler/AbstractHandlerMappingTests.java
@@ -0,0 +1,92 @@ +/* + * Copyright 2002-2015 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
c36435c0427c75d4dcee382a88a466ad96241faa.json
Execute HandlerInterceptors in registration order Prior to this commit, registering `HandlerInterceptor`s using the `InterceptorRegistry` would not guarantee their order of execution. In fact, `HandlerInterceptor`s would always be executed before `MappedInterceptor`s. This change makes `MappedInterceptor` implement t...
spring-webmvc/src/test/java/org/springframework/web/servlet/handler/MappedInterceptorTests.java
@@ -15,18 +15,26 @@ */ package org.springframework.web.servlet.handler; +import static org.junit.Assert.*; +import static org.mockito.BDDMockito.any; +import static org.mockito.BDDMockito.*; +import static org.mockito.Mockito.mock; + import java.util.Comparator; import java.util.Map; +import javax.servlet.http...
true
Other
spring-projects
spring-framework
d686f615f6d207ef9ad554cf7a9850cebd977b10.json
Fix typo in reference Issue: SPR-13043
src/asciidoc/web-mvc.adoc
@@ -3176,7 +3176,7 @@ For example given: [subs="verbatim,quotes"] ---- @RequestMapping("/people/{id}/addresses") - public class MyController { + public class PersonAddressController { @RequestMapping("/{country}") public HttpEntity getAddress(@PathVariable String country) { ... } @@ -31...
false
Other
spring-projects
spring-framework
90d54285d292fca38727700874824092fb6a3dc9.json
Add httpMethods property to LocalChangeInterceptor Issue: SPR-13032
spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/LocaleChangeInterceptor.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2015 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 javax.servlet.http.Ht...
false
Other
spring-projects
spring-framework
0612bc7bc5a82ff7414d8c8bcf665599d23a5225.json
Harmonize default converters Provide Converter implementations for Charset, Currency and TimeZone as related PropertyEditors are available for those. Issue: SPR-13020
spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java
@@ -16,6 +16,8 @@ package org.springframework.core.convert.support; +import java.nio.charset.Charset; +import java.util.Currency; import java.util.Locale; import java.util.UUID; @@ -75,7 +77,7 @@ public static void addDefaultConverters(ConverterRegistry converterRegistry) { converterRegistry.addConverter(...
true
Other
spring-projects
spring-framework
0612bc7bc5a82ff7414d8c8bcf665599d23a5225.json
Harmonize default converters Provide Converter implementations for Charset, Currency and TimeZone as related PropertyEditors are available for those. Issue: SPR-13020
spring-core/src/main/java/org/springframework/core/convert/support/StringToCharsetConverter.java
@@ -0,0 +1,36 @@ +/* + * Copyright 2002-2015 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
0612bc7bc5a82ff7414d8c8bcf665599d23a5225.json
Harmonize default converters Provide Converter implementations for Charset, Currency and TimeZone as related PropertyEditors are available for those. Issue: SPR-13020
spring-core/src/main/java/org/springframework/core/convert/support/StringToCurrencyConverter.java
@@ -0,0 +1,36 @@ +/* + * Copyright 2002-2015 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
0612bc7bc5a82ff7414d8c8bcf665599d23a5225.json
Harmonize default converters Provide Converter implementations for Charset, Currency and TimeZone as related PropertyEditors are available for those. Issue: SPR-13020
spring-core/src/main/java/org/springframework/core/convert/support/StringToTimeZoneConverter.java
@@ -0,0 +1,39 @@ +/* + * Copyright 2002-2015 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
0612bc7bc5a82ff7414d8c8bcf665599d23a5225.json
Harmonize default converters Provide Converter implementations for Charset, Currency and TimeZone as related PropertyEditors are available for those. Issue: SPR-13020
spring-core/src/test/java/org/springframework/core/convert/support/DefaultConversionServiceTests.java
@@ -20,12 +20,14 @@ import java.lang.reflect.Method; import java.math.BigDecimal; import java.math.BigInteger; +import java.nio.charset.Charset; import java.time.ZoneId; import java.util.AbstractList; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections...
true
Other
spring-projects
spring-framework
c0269770af0f2f51cc7758aa096d8369907d439f.json
Use BeanUtils to instantiate target type Use BeanUtils.instantiate(Class<?>) instead of a raw call to type.newInstance() as the former has more checks. Issue: SPR-12520
spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
@@ -648,7 +648,7 @@ else if (Map.class.isAssignableFrom(type)) { return CollectionFactory.createMap(type, (keyDesc != null ? keyDesc.getType() : null), 16); } else { - return type.newInstance(); + return BeanUtils.instantiate(type); } } catch (Exception ex) {
false
Other
spring-projects
spring-framework
3a8f30613da0138b0491306a2cc6f19a86e60ab0.json
Update the what's new section
src/asciidoc/index.adoc
@@ -1046,56 +1046,76 @@ method has been added. === Web Improvements +* The existing support for resource handling based on the `ResourceHttpRequestHandler` + has been expanded with new abstractions `ResourceResolver`, `ResourceTransformer`, + and `ResourceUrlProvider`. A number of built-in implementations provid...
false
Other
spring-projects
spring-framework
1f6c40fd8687c8bfb26497fbdffe45e41b747d71.json
Polish recent changes to reference manual
src/asciidoc/index.adoc
@@ -121,122 +121,127 @@ robust, __maintainable__ applications. === Modules The Spring Framework consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented -Programming), Instrumentation, and Test, as shown in the following d...
false
Other
spring-projects
spring-framework
96563c7eea7f33e5a1fc37b6491ca333b2cca2c9.json
Update Javadoc in SimpMessageSendingOperations Issue: SPR-12143
spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageSendingOperations.java
@@ -27,7 +27,17 @@ * the Spring Framework support for Simple Messaging Protocols (like STOMP). * * <p>For more on user destinations see - * {@link org.springframework.messaging.simp.user.UserDestinationResolver}. + * {@link org.springframework.messaging.simp.user.UserDestinationResolver + * UserDestinationResolve...
false
Other
spring-projects
spring-framework
2ef20f63bc97cb4612befdc9d63cab1554694992.json
Remove assertion making locations mandatory This change finishes work started in SPR-12133. Issue: SPR-12133
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
@@ -104,7 +104,7 @@ public ResourceHttpRequestHandler() { * for serving static resources. */ public void setLocations(List<Resource> locations) { - Assert.notEmpty(locations, "Locations list must not be empty"); + Assert.notNull(locations, "Locations list must not be null"); this.locations.clear(); this...
false
Other
spring-projects
spring-framework
36542549fa5712b235eb4e7d60e3de537e84416b.json
Add HTTP status to ServletRequestHandledEvent Issue: SPR-12119
spring-web/src/main/java/org/springframework/web/context/support/ServletRequestHandledEvent.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 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,7 +28,7 @@ @SuppressWarnings("serial") ...
true
Other
spring-projects
spring-framework
36542549fa5712b235eb4e7d60e3de537e84416b.json
Add HTTP status to ServletRequestHandledEvent Issue: SPR-12119
spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
@@ -993,7 +993,7 @@ protected final void processRequest(HttpServletRequest request, HttpServletRespo } } - publishRequestHandledEvent(request, startTime, failureCause); + publishRequestHandledEvent(request, response, startTime, failureCause); } } @@ -1054,7 +1054,7 @@ private void resetContextHold...
true
Other
spring-projects
spring-framework
ac164088d6e07c2c65dff5900c3109b64a5810ab.json
Fix typos in reference manual manger --> manager
src/asciidoc/index.adoc
@@ -18742,7 +18742,7 @@ conjunction with `@ContextConfiguration`. ==== If the default conventions are sufficient for your test configuration, you can avoid using `@TransactionConfiguration` altogether. In other words, if you have only one -transaction manger -- or if you have multiple transaction mangers but the tra...
false
Other
spring-projects
spring-framework
4df05d1f98ade553c085ebd811f806c77f090a7d.json
Remove assertion on number of resource locations With the new ResourceResolver abstraction and resource resolver chain in 4.1, the assumption that resources are found by checking for the URL path under the configured locations is no longer accurate. A custom ResourceResolver could find resources in ways that don't de...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java
@@ -141,7 +141,6 @@ protected String[] getPathPatterns() { * Returns a {@link ResourceHttpRequestHandler} instance. */ protected ResourceHttpRequestHandler getRequestHandler() { - Assert.isTrue(!CollectionUtils.isEmpty(locations), "At least one location is required for resource handling."); ResourceHttpRequ...
true
Other
spring-projects
spring-framework
4df05d1f98ade553c085ebd811f806c77f090a7d.json
Remove assertion on number of resource locations With the new ResourceResolver abstraction and resource resolver chain in 4.1, the assumption that resources are found by checking for the URL path under the configured locations is no longer accurate. A custom ResourceResolver could find resources in ways that don't de...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
@@ -86,11 +86,11 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H private static final String CONTENT_ENCODING = "Content-Encoding"; - private List<Resource> locations; + private final List<Resource> locations = new ArrayList<Resource>(4); - private final List<ResourceResolver...
true
Other
spring-projects
spring-framework
1bce6ac60cf133adaa4f997c7fba066bf84b4c9a.json
Discontinue use of deprecated AssertThrows This commit refactors ReflectionTestUtilsTests so that it no longer uses the deprecated AssertThrows class.
spring-test/src/test/java/org/springframework/test/util/ReflectionTestUtilsTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 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,21 @@ package org.springframew...
false
Other
spring-projects
spring-framework
27be396b06d8b0e523c16627abd14a8266394a01.json
Update Javadoc for AssertThrows
spring-test/src/main/java/org/springframework/test/AssertThrows.java
@@ -17,9 +17,11 @@ package org.springframework.test; /** - * Simple method object encapsulation of the 'test-for-Exception' scenario (for JUnit). + * {@code AssertThrows} is a simple method object that encapsulates the + * <em>'test-for-exception'</em> scenario for unit testing. Intended for + * use with JUnit or T...
false
Other
spring-projects
spring-framework
0b02551e2f8f8ae7107b2303c10432542a201fbe.json
Update resource handler Java config This change separates out resource chain related methods previously in ResourceHandlerRegistration into a new class ResourceChainRegistration with the goal of improving readability. Along with that, the registration of caching resolver and transformer is now explicitly controled wi...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceChainRegistration.java
@@ -0,0 +1,118 @@ +/* + * Copyright 2002-2014 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
0b02551e2f8f8ae7107b2303c10432542a201fbe.json
Update resource handler Java config This change separates out resource chain related methods previously in ResourceHandlerRegistration into a new class ResourceChainRegistration with the goal of improving readability. Along with that, the registration of caching resolver and transformer is now explicitly controled wi...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java
@@ -16,27 +16,16 @@ package org.springframework.web.servlet.config.annotation; -import java.util.ArrayList; -import java.util.List; - import org.springframework.cache.Cache; -import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.core.io.Resource; import org.springframework.c...
true
Other
spring-projects
spring-framework
0b02551e2f8f8ae7107b2303c10432542a201fbe.json
Update resource handler Java config This change separates out resource chain related methods previously in ResourceHandlerRegistration into a new class ResourceChainRegistration with the goal of improving readability. Along with that, the registration of caching resolver and transformer is now explicitly controled wi...
spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java
@@ -17,14 +17,12 @@ package org.springframework.web.servlet.config.annotation; import java.util.List; -import java.util.Map; import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; -import org.springframework.beans.DirectFieldAccessor; import org.springfram...
true
Other
spring-projects
spring-framework
0b02551e2f8f8ae7107b2303c10432542a201fbe.json
Update resource handler Java config This change separates out resource chain related methods previously in ResourceHandlerRegistration into a new class ResourceChainRegistration with the goal of improving readability. Along with that, the registration of caching resolver and transformer is now explicitly controled wi...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java
@@ -113,7 +113,7 @@ static class WebConfig extends WebMvcConfigurationSupport { public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**") .addResourceLocations("classpath:org/springframework/web/servlet/resource/test/") - .addResolver(new VersionReso...
true
Other
spring-projects
spring-framework
ae48b5f7f22ca967ced6f206b30af38b492bf68b.json
Move builder methods to VersionResourceResolver This change moves the VersionStrategy builder-style methods from ResourceHandlerRegistration to VersionResourceResolver. This makes the methods more universally usable and also makes use of ResourceHandlerRegistration more readable, i.e. simply a sequence of addResource...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java
@@ -17,9 +17,7 @@ package org.springframework.web.servlet.config.annotation; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.springframework.cache.Cache; import org.springframework.cache.concurrent.ConcurrentMapCache; @@ -63,10 +61,12 @@ public cl...
true
Other
spring-projects
spring-framework
ae48b5f7f22ca967ced6f206b30af38b492bf68b.json
Move builder methods to VersionResourceResolver This change moves the VersionStrategy builder-style methods from ResourceHandlerRegistration to VersionResourceResolver. This makes the methods more universally usable and also makes use of ResourceHandlerRegistration more readable, i.e. simply a sequence of addResource...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java
@@ -24,23 +24,26 @@ import org.springframework.util.StringUtils; /** - * A {@code ResourceResolver} that resolves request paths containing a version - * string, i.e. version information about the resource being requested. - * This resolver can be useful to set up HTTP caching strategies by changing - * resources' U...
true
Other
spring-projects
spring-framework
ae48b5f7f22ca967ced6f206b30af38b492bf68b.json
Move builder methods to VersionResourceResolver This change moves the VersionStrategy builder-style methods from ResourceHandlerRegistration to VersionResourceResolver. This makes the methods more universally usable and also makes use of ResourceHandlerRegistration more readable, i.e. simply a sequence of addResource...
spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java
@@ -143,11 +143,12 @@ public void noCacheResourceChain() throws Exception { @Test public void versionResourceChain() throws Exception { - this.registration - .addTransformer(new AppCacheManifestTransfomer()) + VersionResourceResolver versionResolver = new VersionResourceResolver() .addFixedVersionStrate...
true
Other
spring-projects
spring-framework
ae48b5f7f22ca967ced6f206b30af38b492bf68b.json
Move builder methods to VersionResourceResolver This change moves the VersionStrategy builder-style methods from ResourceHandlerRegistration to VersionResourceResolver. This makes the methods more universally usable and also makes use of ResourceHandlerRegistration more readable, i.e. simply a sequence of addResource...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java
@@ -113,7 +113,7 @@ static class WebConfig extends WebMvcConfigurationSupport { public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**") .addResourceLocations("classpath:org/springframework/web/servlet/resource/test/") - .addContentVersionStrategy("...
true
Other
spring-projects
spring-framework
fbfb7a3c482443c39a74058446e5d1a9a2c73807.json
Add PathResourceResolver conditionally The ResourceHandlerRegistration now checks if the last resolver is an instance of PathResourceResolver and if so it skips adding it. This change also creates and adds the VersionResourceResolver (as well as CssLinkTransformer) the first time any VersionStrategy is registered. Th...
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java
@@ -63,14 +63,15 @@ public class ResourceHandlerRegistration { private List<ResourceResolver> customResolvers = new ArrayList<ResourceResolver>(); - private List<ResourceTransformer> customTransformers = new ArrayList<ResourceTransformer>(); + private VersionResourceResolver versionResolver; - private Map<Strin...
true
Other
spring-projects
spring-framework
fbfb7a3c482443c39a74058446e5d1a9a2c73807.json
Add PathResourceResolver conditionally The ResourceHandlerRegistration now checks if the last resolver is an instance of PathResourceResolver and if so it skips adding it. This change also creates and adds the VersionResourceResolver (as well as CssLinkTransformer) the first time any VersionStrategy is registered. Th...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java
@@ -46,20 +46,20 @@ protected Resource resolveResourceInternal(HttpServletRequest request, String re } @Override - protected String resolveUrlPathInternal(String resourceUrlPath, List<? extends Resource> locations, + protected String resolveUrlPathInternal(String resourcePath, List<? extends Resource> locations, ...
true
Other
spring-projects
spring-framework
fbfb7a3c482443c39a74058446e5d1a9a2c73807.json
Add PathResourceResolver conditionally The ResourceHandlerRegistration now checks if the last resolver is an instance of PathResourceResolver and if so it skips adding it. This change also creates and adds the VersionResourceResolver (as well as CssLinkTransformer) the first time any VersionStrategy is registered. Th...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java
@@ -48,7 +48,8 @@ public class VersionResourceResolver extends AbstractResourceResolver { private AntPathMatcher pathMatcher = new AntPathMatcher(); - private Map<String, VersionStrategy> versionStrategyMap = Collections.emptyMap(); + /** Map from path pattern -> VersionStrategy */ + private final Map<String, Ver...
true
Other
spring-projects
spring-framework
fbfb7a3c482443c39a74058446e5d1a9a2c73807.json
Add PathResourceResolver conditionally The ResourceHandlerRegistration now checks if the last resolver is an instance of PathResourceResolver and if so it skips adding it. This change also creates and adds the VersionResourceResolver (as well as CssLinkTransformer) the first time any VersionStrategy is registered. Th...
spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java
@@ -109,14 +109,13 @@ public void hasMappingForPattern() { @Test public void simpleResourceChain() throws Exception { - ResourceResolver mockResolver = Mockito.mock(ResourceResolver.class); ResourceTransformer mockTransformer = Mockito.mock(ResourceTransformer.class); this.registration.addResolver(mockRe...
true
Other
spring-projects
spring-framework
fbfb7a3c482443c39a74058446e5d1a9a2c73807.json
Add PathResourceResolver conditionally The ResourceHandlerRegistration now checks if the last resolver is an instance of PathResourceResolver and if so it skips adding it. This change also creates and adds the VersionResourceResolver (as well as CssLinkTransformer) the first time any VersionStrategy is registered. Th...
spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java
@@ -113,7 +113,7 @@ static class WebConfig extends WebMvcConfigurationSupport { public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**") .addResourceLocations("classpath:org/springframework/web/servlet/resource/test/") - .addVersionHash("/**"); + ...
true
Other
spring-projects
spring-framework
d47c5433cb2480df285b7a0901372615852d526e.json
Improve configuration changes in GuavaCacheManager Prior to this commit, setting the parameters used to build the caches was fragile in static mode as the caches were created right when the setCacheNames setter was called. This commit provides a better handling of such arguments and also provide a way to restore the ...
spring-context-support/src/main/java/org/springframework/cache/guava/GuavaCacheManager.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import java.util.Arrays; im...
true
Other
spring-projects
spring-framework
d47c5433cb2480df285b7a0901372615852d526e.json
Improve configuration changes in GuavaCacheManager Prior to this commit, setting the parameters used to build the caches was fragile in static mode as the caches were created right when the setCacheNames setter was called. This commit provides a better handling of such arguments and also provide a way to restore the ...
spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheManagerTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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,15 +16,19 @@ package org.springframew...
true
Other
spring-projects
spring-framework
2963fd9e5a8f01eb365469b50d443d56fc7a8ad0.json
Fix broken Javadoc link in @TestPropertySource
spring-test/src/main/java/org/springframework/test/context/TestPropertySource.java
@@ -199,7 +199,7 @@ * * <h3>Precedence</h3> * <p>Properties declared via this attribute have higher precedence than - * properties loaded from resource {@link locations}. + * properties loaded from resource {@link #locations}. * * <p>This attribute may be used in conjunction with {@link #value} * <e...
false
Other
spring-projects
spring-framework
5ba3db6a7d28494c4fbf3a908f5591bca0d90457.json
Fix failing CompositePropertySourceTests Fix CompositePropertySourceTests which fails when run we debug logging.
spring-core/src/test/java/org/springframework/core/env/CompositePropertySourceTests.java
@@ -20,7 +20,6 @@ import org.junit.Test; -import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; /** @@ -39,8 +38,11 @@ public void addFirst() { composite.addPropertySource(p3); composite.addPropertySource(p1); composite.addFirstPropertySource(p1); - assertThat(composite.toString(),...
false
Other
spring-projects
spring-framework
bb45fb4538d723ecdc136ceaaba032bcf8cdb42c.json
Restore sleep interval between recovery attempt Commit 6a04831 introduced a regression that lead to burst recovery attempts when the broker is up but the listener is failing for some reason (the most obvious one being that the destination does not exist). Since the sleep period between recovery attempts strategy is m...
spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
@@ -1040,6 +1040,11 @@ public void run() { } catch (Throwable ex) { clearResources(); + if (!this.lastMessageSucceeded) { + // We failed more than once in a row or on startup - sleep before + // first recovery attempt. + sleepBeforeRecoveryAttempt(); + } this.lastMessageSucceeded = f...
false
Other
spring-projects
spring-framework
371d93b3463c5157f3c4b2b809084ddb00ae2b9e.json
Detect unsent DISCONNECT messages This change uses a ChannelInterceptor (inserted at index 0) to detect when a DISCONNECT message is precluded from being sent on the clientInboundChannel. This can happen if another interceptor allows a runtime exception out from preSend or returns false. It is crucial for such messag...
spring-messaging/src/main/java/org/springframework/messaging/simp/broker/AbstractBrokerMessageHandler.java
@@ -30,6 +30,11 @@ import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHandler; import org.springframework.messaging.SubscribableChannel; +import org.springframework.messaging.simp.SimpMessageHeaderAccessor; +import org.springframework.messaging.simp.SimpMessageType; +imp...
true
Other
spring-projects
spring-framework
371d93b3463c5157f3c4b2b809084ddb00ae2b9e.json
Detect unsent DISCONNECT messages This change uses a ChannelInterceptor (inserted at index 0) to detect when a DISCONNECT message is precluded from being sent on the clientInboundChannel. This can happen if another interceptor allows a runtime exception out from preSend or returns false. It is crucial for such messag...
spring-messaging/src/main/java/org/springframework/messaging/support/AbstractMessageChannel.java
@@ -81,13 +81,27 @@ public void addInterceptor(ChannelInterceptor interceptor) { this.interceptors.add(interceptor); } + /** + * Add a channel interceptor at the specified index. + */ + public void addInterceptor(int index, ChannelInterceptor interceptor) { + this.interceptors.add(index, interceptor); + } + ...
true
Other
spring-projects
spring-framework
371d93b3463c5157f3c4b2b809084ddb00ae2b9e.json
Detect unsent DISCONNECT messages This change uses a ChannelInterceptor (inserted at index 0) to detect when a DISCONNECT message is precluded from being sent on the clientInboundChannel. This can happen if another interceptor allows a runtime exception out from preSend or returns false. It is crucial for such messag...
spring-messaging/src/test/java/org/springframework/messaging/simp/config/MessageBrokerConfigurationTests.java
@@ -130,7 +130,7 @@ public void clientInboundChannelCustomized() { AbstractSubscribableChannel channel = this.customContext.getBean( "clientInboundChannel", AbstractSubscribableChannel.class); - assertEquals(1, channel.getInterceptors().size()); + assertEquals(2, channel.getInterceptors().size()); Thre...
true
Other
spring-projects
spring-framework
371d93b3463c5157f3c4b2b809084ddb00ae2b9e.json
Detect unsent DISCONNECT messages This change uses a ChannelInterceptor (inserted at index 0) to detect when a DISCONNECT message is precluded from being sent on the clientInboundChannel. This can happen if another interceptor allows a runtime exception out from preSend or returns false. It is crucial for such messag...
spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java
@@ -173,7 +173,7 @@ public void simpleBroker() { List<Class<? extends MessageHandler>> subscriberTypes = Arrays.<Class<? extends MessageHandler>>asList(SimpAnnotationMethodMessageHandler.class, UserDestinationMessageHandler.class, SimpleBrokerMessageHandler.class); - testChannel("clientInboundChannel", ...
true
Other
spring-projects
spring-framework
38777955d20f354be6a4c88ea8b702b1051dc147.json
Escape single quotes in the reference manual This commit ensures that single quotes nested in double quotes in code examples in the reference manual are properly escaped using ''. Issue: SPR-12246
src/asciidoc/appendix.adoc
@@ -144,8 +144,8 @@ code in a callback, while still respecting and participating in Spring's generic `DataAccessException` hierarchy. The `HibernateDaoSupport` base class offers methods to access the current transactional `Session` and to convert exceptions in such a scenario; similar methods are also available as s...
true
Other
spring-projects
spring-framework
38777955d20f354be6a4c88ea8b702b1051dc147.json
Escape single quotes in the reference manual This commit ensures that single quotes nested in double quotes in code examples in the reference manual are properly escaped using ''. Issue: SPR-12246
src/asciidoc/index.adoc
@@ -4790,7 +4790,7 @@ Find below the custom `BeanPostProcessor` implementation class definition: public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { - System.out.println("Bean '" + beanName + "' created : " + bean.toString()); + System.out.println("Bean ''" +...
true
Other
spring-projects
spring-framework
2a0fb1b6844296a5c75807e5c82f0492eebe094b.json
Fix broken links to JIRA issues
src/asciidoc/index.adoc
@@ -1057,7 +1057,7 @@ method has been added. where an underlying service (or perhaps a call to `AsyncRestTemplate`) already returns `ListenableFuture`. * `@ModelAttribute` methods are now invoked in an order that respects inter-dependencies. - See jira.springsource.org/browse/SPR-6299[SPR-6299]. + See https://...
false
Other
spring-projects
spring-framework
983b5338ed0284388d8ac528821a918cdb3b2634.json
Fix typo in documentation Issue: SPR-8025
src/asciidoc/index.adoc
@@ -30263,7 +30263,7 @@ In the example, the `@RequestMapping` is used in a number of places. The first u on the type (class) level, which indicates that all handling methods on this controller are relative to the `/appointments` path. The `get()` method has a further `@RequestMapping` refinement: it only accepts GET...
false
Other
spring-projects
spring-framework
94e26fd72de2abaf5b14980d0000036807dad534.json
Remove outdated references to ContextLoaderServlet Issue: SPR-7725
src/asciidoc/index.adoc
@@ -8883,14 +8883,6 @@ You can register an `ApplicationContext` using the `ContextLoaderListener` as fo <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> - - <!-- or use the ContextLoaderServlet instead of the above listener - __<servlet> - <servlet-na...
false
Other
spring-projects
spring-framework
0026d8faf80ed100baec4f6fa9de4c8a8e5726a3.json
Update package-info for org.springframework.test
spring-test/src/main/java/org/springframework/test/package-info.java
@@ -1,9 +1,8 @@ - /** + * Generic unit testing support classes. * - * This package contains the legacy JUnit 3.8 class hierarchy, which as of Spring 3.0 - * has been deprecated in favor of using the listener-based <em>Spring TestContext Framework</em>. - * + * @see org.springframework.test.util */ + package org.s...
false
Other
spring-projects
spring-framework
1947de3334827e90b84c6f7951a52f7747221083.json
Provide subclass hooks in path matching resolver Update PathMatchingResourcePatternResolver to include additional protected methods that can be used by subclasses to optimize which JARs are searched. Issue: SPR-12231
spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
@@ -35,7 +35,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; @@ -317,9 +316,19 @@ protected Resource[] findAllC...
false
Other
spring-projects
spring-framework
2667956a30960e6683e794d8bcf9860319af3ad8.json
Initialize JNDI to fix failing Environment test Issue: SPR-12223
spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java
@@ -16,15 +16,17 @@ package org.springframework.web.context.support; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import javax.naming.NamingException; import org.junit.Test; import org.springframework.core.env.Config...
false
Other
spring-projects
spring-framework
752574de1d529eb9eff413b0bffc2c51b5180012.json
Optimize SystemEnvPropertySource when possible Update SystemEnvironmentPropertySource to attempt optimized Map lookups first, and only fall-back to the defensive SecurityManager safe-mode if these fail. Issue: SPR-12224
spring-core/src/main/java/org/springframework/core/env/SystemEnvironmentPropertySource.java
@@ -63,6 +63,9 @@ */ public class SystemEnvironmentPropertySource extends MapPropertySource { + /** if SecurityManager scenarios mean that property access should be via getPropertyNames() */ + private boolean usePropertyNames; + /** * Create a new {@code SystemEnvironmentPropertySource} with the given name an...
true
Other
spring-projects
spring-framework
752574de1d529eb9eff413b0bffc2c51b5180012.json
Optimize SystemEnvPropertySource when possible Update SystemEnvironmentPropertySource to attempt optimized Map lookups first, and only fall-back to the defensive SecurityManager safe-mode if these fail. Issue: SPR-12224
spring-core/src/test/java/org/springframework/core/env/SystemEnvironmentPropertySourceTests.java
@@ -16,15 +16,15 @@ package org.springframework.core.env; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; - import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; +import static org.hamcrest.CoreMatchers.*; +import stati...
true
Other
spring-projects
spring-framework
5b1341f4b572277c33a8ebf7ade1bfdb5de03437.json
Fix String equality Issue: SPR-12105
spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java
@@ -44,6 +44,7 @@ * * @author Andy Clement * @author Phillip Webb + * @author Stephane Nicoll * @since 3.0 */ // TODO support multidimensional arrays @@ -213,54 +214,54 @@ public void generateCode(MethodVisitor mv, CodeFlow codeflow) { } if (this.indexedType == IndexedType.array) { - if (exitType...
false
Other
spring-projects
spring-framework
1ca0460534d207a4f3d2861d34dbb8bacb76eb27.json
Add equals/hashcode to FlashMap Brings consistency with the existing compareTo implementation.
spring-webmvc/src/main/java/org/springframework/web/servlet/FlashMap.java
@@ -20,6 +20,7 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; /** @@ -146,6 +147,29 @@ public int compareTo(FlashMap other) { } } + @Override + public boolean...
false
Other
spring-projects
spring-framework
bb8be509cdcd2d9512bcbab487dd5d85c6e888fe.json
Remove return statements in finally blocks
spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
@@ -877,12 +877,11 @@ protected void doService(HttpServletRequest request, HttpServletResponse respons doDispatch(request, response); } finally { - if (WebAsyncUtils.getAsyncManager(request).isConcurrentHandlingStarted()) { - return; - } - // Restore the original attribute snapshot, in case of an inc...
false
Other
spring-projects
spring-framework
b910ff34e6d5f1cfd3ad4ee31d5a7674dc5a69ed.json
Exclude infra modules from public distributions Prior to this commit, spring-build-src and spring-framework-bom internal artifacts were published as part of the distribution bundle. This commit excludes those project so that those unnecessary artifacts are no longer shipped. Issue: SPR-12087
build.gradle
@@ -17,6 +17,10 @@ ext { linkScmUrl = 'https://github.com/spring-projects/spring-framework' linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git' linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git' + + moduleProjects = subprojects.findAll { + ...
false
Other
spring-projects
spring-framework
2553fb8ba1cef72d594032149befd02a56300f8a.json
Apply ListenableFuture support to AspectJ Prior to this commit, only @Async annotated methods with proxy style had an explicit support for ListenableFuture. This commit brings that support to AspectJ as well. Issue: SPR-12092
spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AbstractAsyncExecutionAspect.aj
@@ -23,7 +23,9 @@ import java.util.concurrent.Future; import org.aspectj.lang.reflect.MethodSignature; import org.springframework.aop.interceptor.AsyncExecutionAspectSupport; +import org.springframework.core.task.AsyncListenableTaskExecutor; import org.springframework.core.task.AsyncTaskExecutor; +import org.sprin...
false
Other
spring-projects
spring-framework
8fc191c95e2d87e4b9a096edd73dea761d4cff3a.json
Apply AsyncUncaughtExceptionHandler to AspectJ Prior to this commit, only @Async annotated methods with proxy style had their custom uncaught exception handler applied. This commit harmonizes the configuration so that AspectJ applies that behaviour as well. Issue: SPR-12090
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java
@@ -20,6 +20,10 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; +import java.util.concurrent.Future; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.BeanFactory; import ...
true
Other
spring-projects
spring-framework
8fc191c95e2d87e4b9a096edd73dea761d4cff3a.json
Apply AsyncUncaughtExceptionHandler to AspectJ Prior to this commit, only @Async annotated methods with proxy style had their custom uncaught exception handler applied. This commit harmonizes the configuration so that AspectJ applies that behaviour as well. Issue: SPR-12090
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java
@@ -23,16 +23,13 @@ import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.springframework.aop.support.AopUtils; import org.springframework.core.BridgeMethodResolver;...
true
Other
spring-projects
spring-framework
8fc191c95e2d87e4b9a096edd73dea761d4cff3a.json
Apply AsyncUncaughtExceptionHandler to AspectJ Prior to this commit, only @Async annotated methods with proxy style had their custom uncaught exception handler applied. This commit harmonizes the configuration so that AspectJ applies that behaviour as well. Issue: SPR-12090
spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AbstractAsyncExecutionAspect.aj
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,14 +35,15 @@ import org.springframework....
true
Other
spring-projects
spring-framework
8fc191c95e2d87e4b9a096edd73dea761d4cff3a.json
Apply AsyncUncaughtExceptionHandler to AspectJ Prior to this commit, only @Async annotated methods with proxy style had their custom uncaught exception handler applied. This commit harmonizes the configuration so that AspectJ applies that behaviour as well. Issue: SPR-12090
spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AspectJAsyncConfiguration.java
@@ -29,6 +29,7 @@ * to enable AspectJ-based asynchronous method execution. * * @author Chris Beams + * @author Stephane Nicoll * @since 3.1 * @see EnableAsync * @see org.springframework.scheduling.annotation.AsyncConfigurationSelector @@ -44,6 +45,9 @@ public AnnotationAsyncExecutionAspect asyncAdvisor() { ...
true
Other
spring-projects
spring-framework
8fc191c95e2d87e4b9a096edd73dea761d4cff3a.json
Apply AsyncUncaughtExceptionHandler to AspectJ Prior to this commit, only @Async annotated methods with proxy style had their custom uncaught exception handler applied. This commit harmonizes the configuration so that AspectJ applies that behaviour as well. Issue: SPR-12090
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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,13 +16,16 @@ package org.springframew...
true
Other
spring-projects
spring-framework
8fc191c95e2d87e4b9a096edd73dea761d4cff3a.json
Apply AsyncUncaughtExceptionHandler to AspectJ Prior to this commit, only @Async annotated methods with proxy style had their custom uncaught exception handler applied. This commit harmonizes the configuration so that AspectJ applies that behaviour as well. Issue: SPR-12090
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/TestableAsyncUncaughtExceptionHandler.java
@@ -0,0 +1,87 @@ +/* + * Copyright 2002-2014 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
8fc191c95e2d87e4b9a096edd73dea761d4cff3a.json
Apply AsyncUncaughtExceptionHandler to AspectJ Prior to this commit, only @Async annotated methods with proxy style had their custom uncaught exception handler applied. This commit harmonizes the configuration so that AspectJ applies that behaviour as well. Issue: SPR-12090
spring-context/src/main/java/org/springframework/scheduling/annotation/AnnotationAsyncExecutionInterceptor.java
@@ -46,7 +46,7 @@ public class AnnotationAsyncExecutionInterceptor extends AsyncExecutionIntercept * executor has been qualified at the method level using {@link Async#value()} */ public AnnotationAsyncExecutionInterceptor(Executor defaultExecutor) { - this(defaultExecutor, new SimpleAsyncUncaughtExceptionHand...
true
Other
spring-projects
spring-framework
c315adf72d284f78efc816be37db55c62008973e.json
Remove unnecessary @SupressWarnings.
spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java
@@ -59,7 +59,7 @@ public CompoundComparator() { * @param comparators the comparators to build into a compound comparator * @see InvertibleComparator */ - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings("unchecked") public CompoundComparator(Comparator... comparators) { Assert.notNull(co...
false
Other
spring-projects
spring-framework
1a880076880a794016e2eeadea4f7f67c38e68ce.json
Improve documentation of SpringFactoriesLoader
spring-core/src/main/java/org/springframework/core/io/support/SpringFactoriesLoader.java
@@ -36,15 +36,17 @@ /** * General purpose factory loading mechanism for internal use within the framework. * - * <p>The {@code SpringFactoriesLoader} loads and instantiates factories of a given type - * from "META-INF/spring.factories" files. The file should be in {@link Properties} format, - * where the key is th...
false