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 | 9f717871e6aafaa0bc53762622b21cacdfff5584.json | Introduce getAnnotation() in AnnotatedElementUtils
This commit introduces a "synthesized annotation" alternative to
getAnnotationAttributes() in AnnotatedElementUtils, analogous to the
recently introduced findAnnotation() methods.
Issue: SPR-13082 | spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java | @@ -766,8 +766,8 @@ public static AnnotationAttributes getAnnotationAttributes(Annotation annotation
* @param annotation the annotation to retrieve the attributes for
* @return the annotation attributes (a specialized Map) with attribute names as keys
* and corresponding attribute values as values; never {@cod... | true |
Other | spring-projects | spring-framework | 9f717871e6aafaa0bc53762622b21cacdfff5584.json | Introduce getAnnotation() in AnnotatedElementUtils
This commit introduces a "synthesized annotation" alternative to
getAnnotationAttributes() in AnnotatedElementUtils, analogous to the
recently introduced findAnnotation() methods.
Issue: SPR-13082 | spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java | @@ -322,6 +322,19 @@ public void getAnnotationAttributesWithAliasedValueComposedAnnotation() {
assertTrue(isAnnotated(element, name));
}
+ @Test
+ public void getAnnotationWithAliasedValueComposedAnnotation() {
+ Class<?> element = AliasedValueComposedContextConfigClass.class;
+ ContextConfig contextConfig = g... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-core/src/main/java/org/springframework/util/concurrent/CompletableToListenableFutureAdapter.java | @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
package org.springframework.util.concurrent;
-
+
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-expression/src/main/java/org/springframework/expression/spel/CodeFlow.java | @@ -222,7 +222,7 @@ public static void insertUnboxNumberInsns(MethodVisitor mv, char targetDescripto
mv.visitTypeInsn(CHECKCAST, "java/lang/Number");
}
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Number", "doubleValue", "()D", false);
- break;
+ break;
case 'F':
if (stackDescriptor.equa... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-expression/src/main/java/org/springframework/expression/spel/ExpressionState.java | @@ -56,7 +56,7 @@ public class ExpressionState {
// When entering a new scope there is a new base object which should be used
// for '#this' references (or to act as a target for unqualified references).
// This stack captures those objects at each nested scope level.
- // For example:
+ // For example:
// #li... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java | @@ -644,7 +644,7 @@ else if (peekToken(TokenKind.COMMA, true)) { // multi item list
while (peekToken(TokenKind.COMMA,true));
closingCurly = eatToken(TokenKind.RCURLY);
expr = new InlineList(toPos(t.startPos,closingCurly.endPos),listElements.toArray(new SpelNodeImpl[listElements.size()]));
-
+
}
... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodExecutor.java | @@ -81,7 +81,7 @@ private Class<?> discoverPublicClass(Method method, Class<?> clazz) {
clazz.getDeclaredMethod(method.getName(), method.getParameterTypes());
return clazz;
} catch (NoSuchMethodException nsme) {
-
+
}
}
Class<?>[] intfaces = clazz.getInterfaces(); | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-expression/src/test/java/org/springframework/expression/spel/MapTests.java | @@ -166,15 +166,15 @@ public void testMapKeysThatAreAlsoSpELKeywords() {
expression = (SpelExpression) parser.parseExpression("foo['abc.def']");
o = expression.getValue(new MapHolder());
assertEquals("value", o);
-
+
expression = (SpelExpression)parser.parseExpression("foo[foo[NEW]]");
o = expression.ge... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java | @@ -2999,7 +2999,7 @@ public void failsWhenSettingContextForExpression_SPR12326() {
context.setVariable("it", person);
expression.setEvaluationContext(context);
assertTrue(expression.getValue(Boolean.class));
- assertTrue(expression.getValue(Boolean.class));
+ assertTrue(expression.getValue... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java | @@ -1917,7 +1917,7 @@ public void SPR12808() throws Exception {
sec.setVariable("no", "1.0");
assertTrue(expression.getValue(sec).toString().startsWith("Object"));
}
-
+
@Test
@SuppressWarnings("rawtypes")
public void SPR13055() throws Exception {
@@ -1962,7 +1962,7 @@ public void SPR12035() {
assertT... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java | @@ -126,10 +126,10 @@ public void handleMessage() {
}
// SPR-12444
-
+
@Test
public void handleMessageToOtherUser() {
-
+
TestSimpUser otherSimpUser = new TestSimpUser("anna");
otherSimpUser.addSessions(new TestSimpSession("456"));
when(this.registry.getUser("anna")).thenReturn(otherSimpUser); | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java | @@ -101,7 +101,7 @@ private List<String> combine(List<String> source, List<String> other) {
List<String> combined = new ArrayList<String>(source);
combined.addAll(other);
return combined;
- }
+ }
/**
* Configure origins to allow, e.g. "http://domain1.com". The special value | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java 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 | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java | @@ -238,11 +238,11 @@ public void modulesToInstallByInstance() {
@Test
public void defaultModules() throws JsonProcessingException, UnsupportedEncodingException {
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().build();
-
+
Long timestamp = 1322903730000L;
DateTime dateTime = new DateTime... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java | @@ -39,7 +39,7 @@ public class CorsConfigurationTests {
public void setup() {
config = new CorsConfiguration();
}
-
+
@Test
public void setNullValues() {
config.setAllowedOrigins(null);
@@ -55,7 +55,7 @@ public void setNullValues() {
config.setMaxAge(null);
assertNull(config.getMaxAge());
}
-
+
... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/CorsConfigurer.java | @@ -26,27 +26,27 @@
/**
* Assist with the registration of {@link CorsConfiguration} mapped to one or more path patterns.
* @author Sebastien Deleuze
- *
+ *
* @since 4.2
* @see CorsRegistration
*/
public class CorsConfigurer {
-
+
private final List<CorsRegistration> registrations = new ArrayList<CorsRe... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/CorsRegistration.java | @@ -25,19 +25,19 @@
/**
* Assists with the creation of a {@link CorsConfiguration} mapped to one or more path patterns.
* If no path pattern is specified, cross-origin request handling is mapped on "/**" .
- *
+ *
* <p>By default, all origins, all headers, credentials and GET, HEAD, POST methods are allowed.
... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.java | @@ -136,5 +136,5 @@ protected void configureHandlerExceptionResolvers(List<HandlerExceptionResolver>
protected void configureCors(CorsConfigurer configurer) {
this.configurers.configureCors(configurer);
}
-
+
} | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java | @@ -200,7 +200,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
private ContentNegotiationManager contentNegotiationManager;
private List<HttpMessageConverter<?>> messageConverters;
-
+
private Map<String, CorsConfiguration> corsConfigurations;
@@ -881,7 +881,7 @@ prote... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.java | @@ -172,5 +172,5 @@ public void configureDefaultServletHandling(DefaultServletHandlerConfigurer conf
@Override
public void configureCors(CorsConfigurer configurer) {
}
-
+
} | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java | @@ -80,7 +80,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
private final List<HandlerInterceptor> adaptedInterceptors = new ArrayList<HandlerInterceptor>();
private CorsProcessor corsProcessor = new DefaultCorsProcessor();
-
+
private final Map<String, CorsConfiguration>... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java | @@ -678,7 +678,7 @@ public UriComponentsBuilder withMethod(Class<?> controllerType, Method method, O
ControllerMethodInvocationInterceptor(Class<?> controllerType) {
this.controllerType = controllerType;
}
-
+
@Override
public Object intercept(Object obj, Method method, Object[] args, MethodProxy pro... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/CorsConfigurerTests.java | @@ -28,30 +28,30 @@
/**
* Test fixture with a {@link CorsConfigurer}.
- *
+ *
* @author Sebastien Deleuze
*/
public class CorsConfigurerTests {
-
+
private CorsConfigurer configurer;
-
+
@Before
public void setUp() {
this.configurer = new CorsConfigurer();
}
-
+
@Test
public void noCorsConf... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java | @@ -271,7 +271,7 @@ public void viewResolvers() throws Exception {
assertEquals("/", accessor.getPropertyValue("prefix"));
assertEquals(".jsp", accessor.getPropertyValue("suffix"));
}
-
+
@Test
public void crossOrigin() {
Map<String, CorsConfiguration> configs = this.config.getCorsConfigurations();
@@ -... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java | @@ -113,7 +113,7 @@ public void preflightRequestWithCorsConfigurationProvider() throws Exception {
assertNotNull(config);
assertArrayEquals(config.getAllowedOrigins().toArray(), new String[]{"*"});
}
-
+
@Test
public void actualRequestWithMappedCorsConfiguration() throws Exception {
CorsConfiguration co... | true |
Other | spring-projects | spring-framework | 7018747ceccb0f715093af2a12312e42d52d9579.json | Remove trailing whitespace in Java source code | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java | @@ -236,7 +236,7 @@ public void testFromMethodCallOnSubclass() {
assertThat(uriComponents.toUriString(), startsWith("http://localhost"));
assertThat(uriComponents.toUriString(), endsWith("/extended/else"));
}
-
+
@Test
public void testFromMethodCallWithTypeLevelUriVars() {
UriComponents uriComponents = ... | true |
Other | spring-projects | spring-framework | def7663ec465ee293d70efd14dbded1fa3332ee5.json | Implement hashCode() for synthesized annotations
Issue: SPR-13066 | spring-core/src/main/java/org/springframework/core/annotation/SynthesizedAnnotationInvocationHandler.java | @@ -20,6 +20,7 @@
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.Map;
@@ -70,6 +71,9 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
... | true |
Other | spring-projects | spring-framework | def7663ec465ee293d70efd14dbded1fa3332ee5.json | Implement hashCode() for synthesized annotations
Issue: SPR-13066 | spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java | @@ -694,6 +694,44 @@ public void equalsForSynthesizedAnnotations() throws Exception {
assertThat(webMappingWithAliases, is(not(synthesizedWebMapping1)));
}
+ @Test
+ public void hashCodeForSynthesizedAnnotations() throws Exception {
+ Method methodWithPath = WebController.class.getMethod("handleMappedWithPathAt... | true |
Other | spring-projects | spring-framework | 1e50d8d5c2ea044885c4f98198b96a773f3e8c97.json | Implement toString() for synthesized annotations
Issue: SPR-13064 | spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java | @@ -827,7 +827,6 @@ static AnnotationAttributes getAnnotationAttributes(AnnotatedElement annotatedEl
AnnotationAttributes attrs = new AnnotationAttributes(annotationType);
for (Method method : getAttributeMethods(annotationType)) {
try {
- ReflectionUtils.makeAccessible(method);
Object value = method.... | true |
Other | spring-projects | spring-framework | 1e50d8d5c2ea044885c4f98198b96a773f3e8c97.json | Implement toString() for synthesized annotations
Issue: SPR-13064 | spring-core/src/main/java/org/springframework/core/annotation/SynthesizedAnnotationInvocationHandler.java | @@ -20,10 +20,13 @@
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
+import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import org.springframework.util.ObjectUtils;
import org.springframework.util.ReflectionUtils;
+imp... | true |
Other | spring-projects | spring-framework | 1e50d8d5c2ea044885c4f98198b96a773f3e8c97.json | Implement toString() for synthesized annotations
Issue: SPR-13064 | spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java | @@ -413,7 +413,7 @@ public void getAnnotationAttributesWithAttributeAliases() throws Exception {
assertEquals("value attribute: ", "/test", attributes.getString(VALUE));
assertEquals("path attribute: ", "/test", attributes.getString("path"));
- method = WebController.class.getMethod("handleMappedWithPathValueA... | true |
Other | spring-projects | spring-framework | 347264e4d99e078aac5a55363bb21d12377a4d33.json | Add "Testing Improvements" to new-in-4.2 section | src/asciidoc/whats-new.adoc | @@ -387,6 +387,8 @@ method has been added.
common setup for any 3rd party framework or within a project.
* `MockRestServiceServer` now supports the `AsyncRestTemplate` for client-side testing.
+
+
[[new-in-4.2]]
== New Features and Enhancements in Spring Framework 4.2
@@ -408,6 +410,12 @@ method has been adde... | false |
Other | spring-projects | spring-framework | bd787769be49fb935648330daa68bece2775eeea.json | Introduce "synthesizable" cache in AnnotationUtils
Issue: SPR-11512 | spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java | @@ -115,6 +115,9 @@ public abstract class AnnotationUtils {
private static final Map<Class<?>, Boolean> annotatedInterfaceCache =
new ConcurrentReferenceHashMap<Class<?>, Boolean>(256);
+ private static final Map<Class<? extends Annotation>, Boolean> synthesizableCache =
+ new ConcurrentReferenceHashMap<Class... | false |
Other | spring-projects | spring-framework | bbd3f902d0ed2c309623f62f760ef63c15282141.json | Fix failing tests | spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/DefaultStompSessionTests.java | @@ -40,6 +40,7 @@
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageDeliveryException;
import org.springframework.messaging.converter.MessageConversionException;
+import org.springframework.messaging.converter.StringMessageConverter;
import org.springframework.messaging.simp.... | false |
Other | spring-projects | spring-framework | 95fe5f90330ab4d17744d55ea647d36323c0af67.json | Fix package references
Closes gh-839 | spring-test/src/main/java/org/springframework/test/web/servlet/ResultActions.java | @@ -21,8 +21,8 @@
* request.
*
* <p>See static factory methods in
- * {@code org.springframework.test.web.server.result.MockMvcResultMatchers}
- * {@code org.springframework.test.web.server.result.MockMvcResultHandlers}
+ * {@code org.springframework.test.web.servlet.result.MockMvcResultMatchers}
+ * {@code org.s... | false |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-web/src/main/java/org/springframework/web/cors/CorsConfigurationMapping.java | @@ -0,0 +1,134 @@
+/*
+ * 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 | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-web/src/main/java/org/springframework/web/filter/CorsFilter.java | @@ -0,0 +1,89 @@
+/*
+ * 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 | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationMappingTests.java | @@ -0,0 +1,51 @@
+/*
+ * 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 | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java | @@ -0,0 +1,120 @@
+/*
+ * 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 | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java | @@ -197,8 +197,8 @@ else if (element.hasAttribute("enableMatrixVariables")) {
configurePathMatchingProperties(handlerMappingDef, element, parserContext);
- RuntimeBeanReference corsConfigurationRef = MvcNamespaceUtils.registerCorsConfiguration(null, parserContext, source);
- handlerMappingDef.getPropertyValues... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/main/java/org/springframework/web/servlet/config/CorsBeanDefinitionParser.java | @@ -113,7 +113,7 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
}
}
- MvcNamespaceUtils.registerCorsConfiguration(corsConfigurations, parserContext, parserContext.extractSource(element));
+ MvcNamespaceUtils.registerCorsConfigurations(corsConfigurations, parserContext, parserC... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java | @@ -119,8 +119,8 @@ private static void registerBeanNameUrlHandlerMapping(ParserContext parserContex
beanNameMappingDef.setSource(source);
beanNameMappingDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
beanNameMappingDef.getPropertyValues().add("order", 2); // consistent with WebMvcConfigurationSupport
- ... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java | @@ -116,8 +116,8 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
// Use a default of near-lowest precedence, still allowing for even lower precedence in other mappings
handlerMappingDef.getPropertyValues().add("order", StringUtils.hasText(order) ? order : Ordered.LOWEST_PRECEDENCE -... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java | @@ -127,8 +127,8 @@ private BeanDefinition registerHandlerMapping(ParserContext context, Object sour
beanDef.getPropertyValues().add("order", "1");
beanDef.getPropertyValues().add("pathMatcher", MvcNamespaceUtils.registerPathMatcher(null, context, source));
beanDef.getPropertyValues().add("urlPathHelper", MvcN... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java | @@ -239,7 +239,7 @@ public RequestMappingHandlerMapping requestMappingHandlerMapping() {
handlerMapping.setOrder(0);
handlerMapping.setInterceptors(getInterceptors());
handlerMapping.setContentNegotiationManager(mvcContentNegotiationManager());
- handlerMapping.setCorsConfiguration(getCorsConfigurations());
+... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | 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.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
@@ -29,6 +28,7 @@
import org.springframework.beans.factory.BeanFactoryUtils;
import org.s... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java | @@ -875,7 +875,7 @@ public void testCorsMinimal() throws Exception {
for (String beanName : beanNames) {
AbstractHandlerMapping handlerMapping = (AbstractHandlerMapping)appContext.getBean(beanName);
assertNotNull(handlerMapping);
- Map<String, CorsConfiguration> configs = handlerMapping.getCorsConfiguratio... | true |
Other | spring-projects | spring-framework | cd9b3903a743eb7656c41390a77b7be7c12f6a5f.json | Introduce CorsFilter and CorsConfigurationMapping
This commit introduces the following changes:
- The new CorsConfigurationMapping class allows to share the mapped
CorsConfiguration logic between AbstractHandlerMapping and CorsFilter
- In AbstractHandlerMapping, the Map<String, CorsConfiguration>
corsConfigura... | spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java | @@ -118,7 +118,7 @@ public void preflightRequestWithCorsConfigurationProvider() throws Exception {
public void actualRequestWithMappedCorsConfiguration() throws Exception {
CorsConfiguration config = new CorsConfiguration();
config.addAllowedOrigin("*");
- this.handlerMapping.setCorsConfiguration(Collections.s... | true |
Other | spring-projects | spring-framework | 14e168f2dc530c67d98f40974dd903810a0420a3.json | Fix typos in @EventListener | spring-context/src/main/java/org/springframework/context/event/EventListener.java | @@ -26,26 +26,28 @@
import org.springframework.core.annotation.AliasFor;
/**
- * Annotation that marks a method to listen for application events. The
- * method may have one (and only one) parameter that reflects the event
- * type to listen to. Or this annotation may refer to the event type(s)
- * using the {@link... | false |
Other | spring-projects | spring-framework | e3bb06c8783ca45633ee361bb637cc3236471479.json | Avoid Java8 API | spring-context/src/main/java/org/springframework/context/event/ApplicationListenerMethodAdapter.java | @@ -131,7 +131,7 @@ protected Object[] resolveArguments(ApplicationEvent event) {
if (declaredEventType == null) {
return null;
}
- if (this.method.getParameters().length == 0) {
+ if (this.method.getParameterTypes().length == 0) {
return new Object[0];
}
if (!ApplicationEvent.class.isAssignableFr... | false |
Other | spring-projects | spring-framework | 3c2efeece40951f0775252a640165a51d71b47e6.json | Investigate claims raised in SPR-13211
This commit adds additional tests to RequestContextHolderTests that
verify proper support for the MockHttpServletRequest managed by Spring
MVC Test in the following scenarios:
- request-scoped service invoked by controller
- session-scoped service invoked by controller
- custom ... | spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/RequestContextHolderTests.java | @@ -16,6 +16,12 @@
package org.springframework.test.web.servlet.samples.spr;
+import java.io.IOException;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
impor... | false |
Other | spring-projects | spring-framework | 7cac5d60a18117c5b9b149b32a7e1ab32cf2ee98.json | Add documentation for @Primary
Issue: SPR-7301 | src/asciidoc/core-beans.adoc | @@ -4280,14 +4280,89 @@ any). These types must be 'wired up' explicitly via XML or using a Spring `@Bean
====
+[[beans-autowired-annotation-primary]]
+=== Fine-tuning annotation-based autowiring with primary
+Because autowiring by type may lead to multiple candidates, it is often necessary to
+have more control ov... | false |
Other | spring-projects | spring-framework | 702fb08dd560314354226333d32adc3e6cb290c1.json | Modify typo in reference document
* AccountServletEndpoint -> AccountServiceEndpoint
Issue: SPR-12993 | src/asciidoc/integration.adoc | @@ -573,7 +573,7 @@ annotation for expressing such dependencies on Spring-managed beans.
}
----
-Our `AccountServletEndpoint` needs to run in the same web application as the Spring
+Our `AccountServiceEndpoint` needs to run in the same web application as the Spring
context to allow for access to Spring's faciliti... | false |
Other | spring-projects | spring-framework | e3bd72808881232672a9ea578317187cfc6a0e4f.json | Remove the RemoteAccountService
Issue: SPR-12992 | src/asciidoc/integration.adoc | @@ -81,18 +81,6 @@ model and corresponding services:
}
----
-[source,java,indent=0]
-[subs="verbatim,quotes"]
-----
- public interface RemoteAccountService extends Remote {
-
- public void insertAccount(Account account) throws RemoteException;
-
- public List<Account> getAccounts(String name) throws RemoteExcept... | false |
Other | spring-projects | spring-framework | 91ac6fc716692b42761a237b4af69aaa29aa69e2.json | Remove descriptions of classic ORM API(JDO/JPA)
Issue: SPR-12987 | src/asciidoc/appendix.adoc | @@ -174,180 +174,6 @@ are simpler and more convenient for many scenarios.
-[[classic-spring-jdo]]
-==== JDO
-For the currently recommended usage patterns for JDO see <<orm-jdo>>
-
-
-[[orm-jdo-template]]
-===== JdoTemplate and `JdoDaoSupport`
-
-Each JDO-based DAO will then receive the `PersistenceManagerFactory`... | true |
Other | spring-projects | spring-framework | 91ac6fc716692b42761a237b4af69aaa29aa69e2.json | Remove descriptions of classic ORM API(JDO/JPA)
Issue: SPR-12987 | src/asciidoc/data-access.adoc | @@ -5660,9 +5660,6 @@ example of a corresponding DAO implementation:
}
----
-Because the above DAO follows the dependency injection pattern, it fits nicely into a
-Spring container, just as it would if coded against Spring's `JdoTemplate`:
-
[source,xml,indent=0]
[subs="verbatim,quotes"]
----
@@ -5840,12 +5837,... | true |
Other | spring-projects | spring-framework | 4a8baebf5908c0734a1297bb20e72268fa48979a.json | Improve MappingRegistry tests and polish
Issue: SPR-11541 | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java | @@ -148,6 +148,13 @@ public List<HandlerMethod> getHandlerMethodsForMappingName(String mappingName) {
return this.mappingRegistry.getHandlerMethodsByMappingName(mappingName);
}
+ /**
+ * Return the internal mapping registry. Provided for testing purposes.
+ */
+ MappingRegistry getMappingRegistry() {
+ return... | true |
Other | spring-projects | spring-framework | 4a8baebf5908c0734a1297bb20e72268fa48979a.json | Improve MappingRegistry tests and polish
Issue: SPR-11541 | spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMethodMappingTests.java | @@ -19,8 +19,9 @@
import static org.junit.Assert.*;
import java.lang.reflect.Method;
+import java.util.Collections;
import java.util.Comparator;
-import java.util.HashSet;
+import java.util.List;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
@@ -34,14 +35,17 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | 71683c5f8db19e3795f27d0c7ad7b4dbaa3083fe.json | Fix regressions from 8f558e7
The change to provide public register/unregister methods in
AbstractHandlerMethodMapping assumed that a single method cannot be
mapped more than once. This is not the case with the MvcEndpoints and
EndpointHandlerMapping from Spring Boot which wrap one or more
non-web Endpoint types with a... | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java | @@ -21,6 +21,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.LinkedHashMap;
import java.util.List;
@@ -227,26 +228,21 @@ public boolean matches(Method method) {
protected abstract T getMapp... | true |
Other | spring-projects | spring-framework | 71683c5f8db19e3795f27d0c7ad7b4dbaa3083fe.json | Fix regressions from 8f558e7
The change to provide public register/unregister methods in
AbstractHandlerMethodMapping assumed that a single method cannot be
mapped more than once. This is not the case with the MvcEndpoints and
EndpointHandlerMapping from Spring Boot which wrap one or more
non-web Endpoint types with a... | spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMethodMappingTests.java | @@ -62,32 +62,32 @@ public void setUp() throws Exception {
@Test(expected = IllegalStateException.class)
public void registerDuplicates() {
- mapping.registerHandlerMethod(handler, method1, "foo");
- mapping.registerHandlerMethod(handler, method2, "foo");
+ mapping.registerMapping("foo", handler, method1);
+ ... | true |
Other | spring-projects | spring-framework | 205e5dfd6fdf89e0049da29817a6474abddbc2e9.json | Support bridged methods in MvcUriComponentsBuilder
Issue: SPR-12977 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java | @@ -21,6 +21,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.servlet.http.HttpServletRequest;
@@ -49,13 +50,15 @@
import org.springframework.util.ObjectUtils;
import org.springframework.util.PathMatcher;
import org.springframework.util.Reflectio... | true |
Other | spring-projects | spring-framework | 205e5dfd6fdf89e0049da29817a6474abddbc2e9.json | Support bridged methods in MvcUriComponentsBuilder
Issue: SPR-12977 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java | @@ -16,6 +16,10 @@
package org.springframework.web.servlet.mvc.method.annotation;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder.*;
+
import java.lang.annotation.Documented;
import java.lang.a... | true |
Other | spring-projects | spring-framework | bb3f26483b78bfd03341bab979c00210f1792cd6.json | Fix CachingResourceResolver key generation
When used in combination with GzipResourceResolver, the
CachingResourceResolver does not properly cache results, since it only
takes the request path as a input for cache key generation.
Here's an example of that behavior:
1. an HTTP client requests a resource with `Accept-... | spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceResolver.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.
@@ -30,6 +30,7 @@
* delegates to the resolver... | true |
Other | spring-projects | spring-framework | bb3f26483b78bfd03341bab979c00210f1792cd6.json | Fix CachingResourceResolver key generation
When used in combination with GzipResourceResolver, the
CachingResourceResolver does not properly cache results, since it only
takes the request path as a input for cache key generation.
Here's an example of that behavior:
1. an HTTP client requests a resource with `Accept-... | spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CachingResourceResolverTests.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.
@@ -27,6 +27,7 @@
import org.springframework.c... | true |
Other | spring-projects | spring-framework | bb3f26483b78bfd03341bab979c00210f1792cd6.json | Fix CachingResourceResolver key generation
When used in combination with GzipResourceResolver, the
CachingResourceResolver does not properly cache results, since it only
takes the request path as a input for cache key generation.
Here's an example of that behavior:
1. an HTTP client requests a resource with `Accept-... | spring-webmvc/src/test/java/org/springframework/web/servlet/resource/GzipResourceResolverTests.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.
@@ -28,6 +28,8 @@
import org.junit.BeforeClass... | true |
Other | spring-projects | spring-framework | 8f558e7c73fd885676a3e9bfe77c9c24da59f30a.json | Add methods to (un)register HandlerMethod mappings
Issue: SPR-11541 | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java | @@ -27,6 +27,7 @@
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -89,7 +90,7 @@
private HandlerMethodMappingNamingStra... | true |
Other | spring-projects | spring-framework | 8f558e7c73fd885676a3e9bfe77c9c24da59f30a.json | Add methods to (un)register HandlerMethod mappings
Issue: SPR-11541 | spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMethodMappingTests.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,10 +16,13 @@
package org.springframew... | true |
Other | spring-projects | spring-framework | 5538863dc94364ef4fdbd10537ab0e2aba3f173d.json | Use shared eventLoopGroup in Reactor2TcpClient | spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/AbstractPromiseToListenableFutureAdapter.java | @@ -80,7 +80,7 @@ public T get() throws InterruptedException {
@Override
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
S result = this.promise.await(timeout, unit);
- if (result == null) {
+ if (!this.promise.isComplete()) {
throw new TimeoutE... | true |
Other | spring-projects | spring-framework | 5538863dc94364ef4fdbd10537ab0e2aba3f173d.json | Use shared eventLoopGroup in Reactor2TcpClient | spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/Reactor2TcpClient.java | @@ -21,8 +21,11 @@
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
import io.netty.channel.nio.NioEventLoopGroup;
+import io.netty.util.concurrent.Future;
+import io.netty.util.concurrent.FutureListener;
import org.reactivestreams.Pu... | true |
Other | spring-projects | spring-framework | 222f6998e4013370f6179ffdd8353b2e9afcd1f5.json | Add userProperties to StandardWebSocketClient
Issue: SPR-12955 | spring-websocket/src/main/java/org/springframework/web/socket/client/standard/StandardWebSocketClient.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.
@@ -21,10 +21,12 @@
import java.net.URI;
impo... | true |
Other | spring-projects | spring-framework | 222f6998e4013370f6179ffdd8353b2e9afcd1f5.json | Add userProperties to StandardWebSocketClient
Issue: SPR-12955 | spring-websocket/src/test/java/org/springframework/web/socket/client/standard/StandardWebSocketClientTests.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.
@@ -16,12 +16,15 @@
package org.springframew... | true |
Other | spring-projects | spring-framework | 7891c0d5ca208ef4f123f2dfa92cd13e6cb25042.json | Update reactor2 support | spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/Reactor2TcpClient.java | @@ -29,14 +29,17 @@
import reactor.core.config.DispatcherConfiguration;
import reactor.core.config.ReactorConfiguration;
import reactor.core.support.NamedDaemonThreadFactory;
-import reactor.fn.BiFunction;
import reactor.fn.Consumer;
import reactor.fn.Function;
import reactor.fn.tuple.Tuple;
import reactor.fn.tu... | true |
Other | spring-projects | spring-framework | 7891c0d5ca208ef4f123f2dfa92cd13e6cb25042.json | Update reactor2 support | spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/Reactor2TcpConnection.java | @@ -16,15 +16,11 @@
package org.springframework.messaging.tcp.reactor;
-import org.reactivestreams.Subscriber;
-import org.reactivestreams.Subscription;
-import org.springframework.util.concurrent.ListenableFutureAdapter;
import reactor.fn.Functions;
import reactor.io.net.ChannelStream;
import reactor.rx.Promis... | true |
Other | spring-projects | spring-framework | a2a105918c65c16cfb12f301dd1146fe46b2a39e.json | Upgrade mockito-core dependency to 1.10.19 | build.gradle | @@ -126,7 +126,7 @@ configure(allprojects) { project ->
testCompile("junit:junit:${junitVersion}") {
exclude group:'org.hamcrest', module:'hamcrest-core'
}
- testCompile("org.mockito:mockito-core:1.9.5") {
+ testCompile("org.mockito:mockito-core:1.10.19") {
exclude group:'org.hamcrest', module:'hamcrest... | false |
Other | spring-projects | spring-framework | 91e46cf2ad55fc8ec3bda087d5fe9c02aa1ec45b.json | Update TODOs in AnnotatedElementUtils[Tests]
Issue: SPR-12738 | spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java | @@ -479,8 +479,6 @@ private static <T> T processWithFindSemantics(AnnotatedElement element, String a
}
try {
- // TODO [SPR-12738] Resolve equivalent parameterized
- // method (i.e., bridged method) in superclass.
Method equivalentMethod = clazz.getDeclaredMethod(method.getName(... | true |
Other | spring-projects | spring-framework | 91e46cf2ad55fc8ec3bda087d5fe9c02aa1ec45b.json | Update TODOs in AnnotatedElementUtils[Tests]
Issue: SPR-12738 | spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java | @@ -209,23 +209,20 @@ public void findAnnotationAttributesInheritedFromAbstractMethod() throws NoSuchM
}
/**
- * TODO [SPR-12738] Enable test.
- *
* <p>{@code AbstractClassWithInheritedAnnotation} declares {@code handleParameterized(T)}; whereas,
* {@code ConcreteClassWithInheritedAnnotation} declares {@c... | true |
Other | spring-projects | spring-framework | 1a6aeb17e118221a9f4e11f08158da6bc4e582bf.json | Add merged RequestPostProcessor to front on merge
Previously MockHttpServletRequestBuilder merge method would append the
parent's (default) RequestPostProcessor implementations to the end. This
means that the default RequestPostProcessor implementations would override
values set by previous RequestPostProcessor implem... | spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java | @@ -537,7 +537,7 @@ public Object merge(Object parent) {
this.pathInfo = parentBuilder.pathInfo;
}
- this.postProcessors.addAll(parentBuilder.postProcessors);
+ this.postProcessors.addAll(0, parentBuilder.postProcessors);
return this;
} | true |
Other | spring-projects | spring-framework | 1a6aeb17e118221a9f4e11f08158da6bc4e582bf.json | Add merged RequestPostProcessor to front on merge
Previously MockHttpServletRequestBuilder merge method would append the
parent's (default) RequestPostProcessor implementations to the end. This
means that the default RequestPostProcessor implementations would override
values set by previous RequestPostProcessor implem... | spring-test/src/test/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilderTests.java | @@ -23,12 +23,12 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
+
import javax.servlet.ServletContext;
import javax.servlet.http.Cookie;
import org.junit.Before;
import org.junit.Test;
-
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import... | true |
Other | spring-projects | spring-framework | 0b43e4e4f2ae8d59bcfb16b8d88c6a0c3a7b7ace.json | Add concurrent test and fix potential NPE
After SPR-12884 (4.2 RC1) introduced support for a selector header
expression on SUBSCRIBE frames, messages from the destination cache
are further filtered based on the selector expression. While adding a
test to find subscriptions at the same time as unsubscribing, a
potentia... | spring-messaging/src/main/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistry.java | @@ -16,8 +16,6 @@
package org.springframework.messaging.simp.broker;
-import static org.springframework.messaging.support.MessageHeaderAccessor.getAccessor;
-
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedHashMap;
@@ -46,6 +44,8 @@
import org.springframework.util.MultiValueMap;
... | true |
Other | spring-projects | spring-framework | 0b43e4e4f2ae8d59bcfb16b8d88c6a0c3a7b7ace.json | Add concurrent test and fix potential NPE
After SPR-12884 (4.2 RC1) introduced support for a selector header
expression on SUBSCRIBE frames, messages from the destination cache
are further filtered based on the selector expression. While adding a
test to find subscriptions at the same time as unsubscribing, a
potentia... | spring-messaging/src/test/java/org/springframework/messaging/simp/broker/DefaultSubscriptionRegistryTests.java | @@ -20,6 +20,9 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
import org.junit.Before;
import org.junit.Test;
@@ -28,10 +31,13 @@
import or... | true |
Other | spring-projects | spring-framework | 85a80e2a946898d7258228092c8aab96b6b25f3f.json | Fix error message typo in ShallowEtagHeaderFilter
Issue: SPR-13194 | spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java | @@ -94,7 +94,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
private void updateResponse(HttpServletRequest request, HttpServletResponse response) throws IOException {
ContentCachingResponseWrapper responseWrapper =
WebUtils.getNativeResponse(response, ContentCachingRespon... | false |
Other | spring-projects | spring-framework | 3272a3b8badc29fd6f6022476dfb0124fbfeca85.json | Check HTTP method before raising 415
This commit moves the check whether an HTTP method supports request
body up to the base class so that all sub-classes can benefit (not just
@RequestBody).
Issue: SPR-13176 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodArgumentResolver.java | @@ -22,6 +22,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
@@ -37,6 +38,8 @@
import org.springframework.core.annotation.AnnotationUtils;
import... | true |
Other | spring-projects | spring-framework | 3272a3b8badc29fd6f6022476dfb0124fbfeca85.json | Check HTTP method before raising 415
This commit moves the check whether an HTTP method supports request
body up to the base class so that all sub-classes can benefit (not just
@RequestBody).
Issue: SPR-13176 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java | @@ -150,14 +150,11 @@ protected <T> Object readWithMessageConverters(NativeWebRequest webRequest, Meth
ServletServerHttpRequest inputMessage = new ServletServerHttpRequest(servletRequest);
Object arg = null;
- if (webRequest.getHeader("Content-Type") != null ||
- SUPPORTED_METHODS.contains(inputMessage.getM... | true |
Other | spring-projects | spring-framework | 3272a3b8badc29fd6f6022476dfb0124fbfeca85.json | Check HTTP method before raising 415
This commit moves the check whether an HTTP method supports request
body up to the base class so that all sub-classes can benefit (not just
@RequestBody).
Issue: SPR-13176 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java | @@ -16,15 +16,10 @@
package org.springframework.web.servlet.mvc.method.annotation;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.*;
-import static org.springframework.web.servlet.HandlerMapping.*;
-
import java.lang.reflect.Method;
import java.net.URI;
import java.nio.charset.Charset;... | true |
Other | spring-projects | spring-framework | 3272a3b8badc29fd6f6022476dfb0124fbfeca85.json | Check HTTP method before raising 415
This commit moves the check whether an HTTP method supports request
body up to the base class so that all sub-classes can benefit (not just
@RequestBody).
Issue: SPR-13176 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorTests.java | @@ -16,16 +16,15 @@
package org.springframework.web.servlet.mvc.method.annotation;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-import static org.junit.Assert.*;
-
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Arr... | true |
Other | spring-projects | spring-framework | 3272a3b8badc29fd6f6022476dfb0124fbfeca85.json | Check HTTP method before raising 415
This commit moves the check whether an HTTP method supports request
body up to the base class so that all sub-classes can benefit (not just
@RequestBody).
Issue: SPR-13176 | spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java | @@ -80,7 +80,12 @@
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.util.UriComponentsBuilder;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import stati... | true |
Other | spring-projects | spring-framework | b439402d5779ffdc8917f06586338bc966561efe.json | Add CORS section to the ref doc | src/asciidoc/web-cors.adoc | @@ -0,0 +1,201 @@
+[[cors]]
+= CORS Support
+
+== Introduction
+
+For security reasons, browsers prohibit AJAX calls to resources residing outside the
+current origin. For example, as you're checking your bank account in one tab, you
+could have the evil.com website in another tab. The scripts from evil.com should not
... | true |
Other | spring-projects | spring-framework | b439402d5779ffdc8917f06586338bc966561efe.json | Add CORS section to the ref doc | src/asciidoc/web.adoc | @@ -32,3 +32,5 @@ include::web-integration.adoc[leveloffset=+1]
include::web-portlet.adoc[leveloffset=+1]
include::web-websocket.adoc[leveloffset=+1]
+
+include::web-cors.adoc[leveloffset=+1] | true |
Other | spring-projects | spring-framework | 693dcba8679ebc83b6b871a214c9e4bf98449eb4.json | Introduce LoggingResultHandler in Spring MVC Test
Prior to this commit, the Spring MVC Test framework only provided
support for printing debug information about the MvcResult to STDOUT.
This commit introduces support for logging `MvcResult` details at
`DEBUG` level via the Apache Commons Logging API. In addition, thi... | spring-test/src/main/java/org/springframework/test/web/servlet/result/MockMvcResultHandlers.java | @@ -16,6 +16,14 @@
package org.springframework.test.web.servlet.result;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.springframework.test.web.se... | true |
Other | spring-projects | spring-framework | 693dcba8679ebc83b6b871a214c9e4bf98449eb4.json | Introduce LoggingResultHandler in Spring MVC Test
Prior to this commit, the Spring MVC Test framework only provided
support for printing debug information about the MvcResult to STDOUT.
This commit introduces support for logging `MvcResult` details at
`DEBUG` level via the Apache Commons Logging API. In addition, thi... | spring-test/src/main/java/org/springframework/test/web/servlet/result/PrintingResultHandler.java | @@ -40,10 +40,13 @@
import org.springframework.web.servlet.support.RequestContextUtils;
/**
- * Result handler that prints {@link MvcResult} details to the "standard" output
- * stream.
- * <p>An instance of this class is typically accessed via
- * {@link MockMvcResultHandlers#print()}.
+ * Result handler that prin... | true |
Other | spring-projects | spring-framework | 693dcba8679ebc83b6b871a214c9e4bf98449eb4.json | Introduce LoggingResultHandler in Spring MVC Test
Prior to this commit, the Spring MVC Test framework only provided
support for printing debug information about the MvcResult to STDOUT.
This commit introduces support for logging `MvcResult` details at
`DEBUG` level via the Apache Commons Logging API. In addition, thi... | spring-test/src/test/java/org/springframework/test/web/servlet/result/PrintingResultHandlerTests.java | @@ -42,10 +42,11 @@
import static org.junit.Assert.*;
/**
- * Tests for {@link PrintingResultHandler}.
+ * Unit tests for {@link PrintingResultHandler}.
*
* @author Rossen Stoyanchev
* @author Sam Brannen
+ * @see org.springframework.test.web.servlet.samples.standalone.resulthandlers.PrintingResultHandlerSmok... | true |
Other | spring-projects | spring-framework | 693dcba8679ebc83b6b871a214c9e4bf98449eb4.json | Introduce LoggingResultHandler in Spring MVC Test
Prior to this commit, the Spring MVC Test framework only provided
support for printing debug information about the MvcResult to STDOUT.
This commit introduces support for logging `MvcResult` details at
`DEBUG` level via the Apache Commons Logging API. In addition, thi... | spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resulthandlers/PrintingResultHandlerSmokeTests.java | @@ -16,13 +16,16 @@
package org.springframework.test.web.servlet.samples.standalone.resulthandlers;
+import java.io.StringWriter;
+
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.stereotype.Control... | true |
Other | spring-projects | spring-framework | 693dcba8679ebc83b6b871a214c9e4bf98449eb4.json | Introduce LoggingResultHandler in Spring MVC Test
Prior to this commit, the Spring MVC Test framework only provided
support for printing debug information about the MvcResult to STDOUT.
This commit introduces support for logging `MvcResult` details at
`DEBUG` level via the Apache Commons Logging API. In addition, thi... | spring-test/src/test/resources/log4j.properties | @@ -3,28 +3,29 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%-5p] [%c] - %m%n
log4j.appender.file=org.apache.log4j.FileAppender
-log4j.appender.file.file=build/spring-test.log
+log4j.appender.file.file=bin/spring-test.log
log4j.ap... | true |
Other | spring-projects | spring-framework | 693dcba8679ebc83b6b871a214c9e4bf98449eb4.json | Introduce LoggingResultHandler in Spring MVC Test
Prior to this commit, the Spring MVC Test framework only provided
support for printing debug information about the MvcResult to STDOUT.
This commit introduces support for logging `MvcResult` details at
`DEBUG` level via the Apache Commons Logging API. In addition, thi... | src/asciidoc/whats-new.adoc | @@ -554,14 +554,9 @@ public @interface MyTestConfig {
@Rule
public final SpringMethodRule springMethodRule = new SpringMethodRule();
----
-* The `ContextCache` that is used for caching ++ApplicationContext++s
- between tests is now a public API with a default implementation that
- can be replaced for custo... | true |
Other | spring-projects | spring-framework | 8d06b06a9bb396d56ccac591875135aedd4cf33e.json | Fix BeanWrapperImpl example code in ref. manual | src/asciidoc/core-validation.adoc | @@ -325,15 +325,15 @@ the properties of instantiated `Companies` and `Employees`:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
- BeanWrapper company = BeanWrapperImpl(new Company());
+ BeanWrapper company = new BeanWrapperImpl(new Company());
// setting the company name..
company.setPropertyValue("name",... | false |
Other | spring-projects | spring-framework | 89cc8e04014f9edd314de3eb4ec0d455f771d35e.json | Restore compatibility with Jackson 2.1
Issue: SPR-12501 | spring-web/src/main/java/org/springframework/http/converter/json/AbstractJackson2HttpMessageConverter.java | @@ -208,13 +208,14 @@ public Object read(Type type, Class<?> contextClass, HttpInputMessage inputMessa
return readJavaType(javaType, inputMessage);
}
+ @SuppressWarnings("deprecation")
private Object readJavaType(JavaType javaType, HttpInputMessage inputMessage) {
try {
if (inputMessage instanceof Mappi... | false |
Other | spring-projects | spring-framework | b542b5277500cd6261a6126bbd73fec2c9250e5b.json | Update Javadoc on AntPathMatcher | spring-core/src/main/java/org/springframework/util/AntPathMatcher.java | @@ -52,6 +52,11 @@
* {@code org/springframework/testing/servlet/bla.jsp} and {@code org/servlet/bla.jsp}</li>
* </ul>
*
+ * <p><strong>Note:</strong> a pattern and a path must both be absolute or must
+ * both be relative in order for the two to match. Therefore it is recommended
+ * that users of this implementa... | false |
Other | spring-projects | spring-framework | 6842fd7fb954e751fb6c310f7183527fd1876653.json | Ensure result ready in asyncDispatch in MockMvc
Issue: SPR-13079 | spring-test/src/main/java/org/springframework/test/web/servlet/request/MockMvcRequestBuilders.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.
@@ -221,6 +221,10 @@ public static MockMultipar... | false |
Other | spring-projects | spring-framework | 8b50750511cc7c05832f1a138102ead02d7148da.json | Fix failure in performance build
The JettySockJsIntegrationTests are enabled in the performance build
only. Following the upgrade to Jetty 9.3 where the
JettyRequestUpgradeStrategy is now Lifecycle as wel as
ServletContextAware, we need to make sure the ApplicationContext
refresh occurs after the ServletContext has be... | spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.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.
@@ -94,7 +94,6 @@ public void setup() throws Ex... | false |
Other | spring-projects | spring-framework | d32216a047150114b8a4626b8b3ee023aae954d2.json | Add reference to Order for event listeners | src/asciidoc/core-beans.adoc | @@ -7852,6 +7852,19 @@ This new method will publish a new `ListUpdateEvent` for every `BlackListEvent`
by the method above. If you need to publish several events, just return a `Collection` of
events instead.
+Finally if you need the listener to be invoked before another one, just add the `@Order`
+annotation to th... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.