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
fb898e17272c13ef01f68125c3bba35f55f3fb7a.json
Remove inconsistent spaces
spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlLobValueTests.java
@@ -112,7 +112,7 @@ public void test5() throws Exception { lob.setTypeValue(preparedStatement, 1, Types.CLOB, "test"); verify(creator).setClobAsAsciiStream(eq(preparedStatement), eq(1), inputStreamCaptor.capture(), eq(3)); byte[] bytes = new byte[3]; - inputStreamCaptor.getValue().read(bytes ); + inputStream...
true
Other
spring-projects
spring-framework
fb898e17272c13ef01f68125c3bba35f55f3fb7a.json
Remove inconsistent spaces
spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolver.java
@@ -73,7 +73,7 @@ protected Object resolveArgumentInternal(MethodParameter parameter, Message<?> m logger.warn("Message headers contain two values for the same header '" + name + "', " + "one in the top level header map and a second in the nested map with native headers. " + "Using the value from top...
true
Other
spring-projects
spring-framework
fb898e17272c13ef01f68125c3bba35f55f3fb7a.json
Remove inconsistent spaces
spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java
@@ -406,7 +406,7 @@ public boolean rollbackOn(Throwable t) { } catch (Throwable t) { if (rollbackException) { - assertEquals("Caught wrong exception", tex, t ); + assertEquals("Caught wrong exception", tex, t); } else { assertEquals("Caught wrong exception", ex, t);
true
Other
spring-projects
spring-framework
fb898e17272c13ef01f68125c3bba35f55f3fb7a.json
Remove inconsistent spaces
spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java
@@ -260,7 +260,7 @@ protected void writePrefix(JsonGenerator generator, Object object) throws IOExce } if (jsonpFunction != null) { generator.writeRaw("/**/"); - generator.writeRaw(jsonpFunction + "(" ); + generator.writeRaw(jsonpFunction + "("); } }
true
Other
spring-projects
spring-framework
fb898e17272c13ef01f68125c3bba35f55f3fb7a.json
Remove inconsistent spaces
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java
@@ -354,7 +354,7 @@ public void handleMatchMatrixVariablesDecoding() { urlPathHelper.setUrlDecode(false); urlPathHelper.setRemoveSemicolonContent(false); - this.handlerMapping.setUrlPathHelper(urlPathHelper ); + this.handlerMapping.setUrlPathHelper(urlPathHelper); request = new MockHttpServletRequest(); ...
true
Other
spring-projects
spring-framework
fb898e17272c13ef01f68125c3bba35f55f3fb7a.json
Remove inconsistent spaces
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
@@ -89,7 +89,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig private long heartbeatTime = TimeUnit.SECONDS.toMillis(25); - private long disconnectDelay = TimeUnit.SECONDS.toMillis(5 ); + private long disconnectDelay = TimeUnit.SECONDS.toMillis(5); private int httpMessageC...
true
Other
spring-projects
spring-framework
bfb2effddb7d2cb9b50c1088b3971028633ad8f2.json
Expose resource lookup function This commit exposes the resource lookup function used by `RouterFunctions.resources(String, Resource)`, so that it can be composed upon. Issue: SPR-16788
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java
@@ -123,14 +123,35 @@ public static <T extends ServerResponse> RouterFunction<T> nest( * For instance * <pre class="code"> * Resource location = new FileSystemResource("public-resources/"); - * RoutingFunction&lt;ServerResponse&gt; resources = RouterFunctions.resources("/resources/**", location); + * RouterF...
true
Other
spring-projects
spring-framework
bfb2effddb7d2cb9b50c1088b3971028633ad8f2.json
Expose resource lookup function This commit exposes the resource lookup function used by `RouterFunctions.resources(String, Resource)`, so that it can be composed upon. Issue: SPR-16788
spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PathResourceLookupFunctionTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import java.io.File; import...
true
Other
spring-projects
spring-framework
c5278aa359a1847b8df89da21b01dd48aa097d53.json
Remove unnecessary boxing Closes gh-1817
spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -265,7 +265,7 @@ else if (isTwoCharToken(Tok...
false
Other
spring-projects
spring-framework
af0cb5374271ddeaab09541eb155cba4a8204d61.json
Support decoding Mono in Jaxb2XmlDecoder Issue: SPR-16759
spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java
@@ -107,6 +107,12 @@ public Flux<Object> decode(Publisher<DataBuffer> inputStream, ResolvableType ele return splitEvents.map(events -> unmarshal(events, outputClass)); } + @Override + public Mono<Object> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, + @Nullable MimeType mimeType, ...
true
Other
spring-projects
spring-framework
af0cb5374271ddeaab09541eb155cba4a8204d61.json
Support decoding Mono in Jaxb2XmlDecoder Issue: SPR-16759
spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java
@@ -23,6 +23,7 @@ import org.junit.Test; import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; @@ -159,7 +160,7 @@ private static void assertCharacters(XMLEvent event, String expectedData) { @Test public voi...
true
Other
spring-projects
spring-framework
af0cb5374271ddeaab09541eb155cba4a8204d61.json
Support decoding Mono in Jaxb2XmlDecoder Issue: SPR-16759
spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java
@@ -227,6 +227,13 @@ public void personTransformWithMono() throws Exception { JSON, Person.class).getBody()); } + @Test // SPR-16759 + public void personTransformWithMonoAndXml() throws Exception { + assertEquals(new Person("ROBERT"), + performPost("/person-transform/mono", MediaType.APPLICATION_XML, ne...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-test/src/main/java/org/springframework/mock/web/reactive/function/server/MockServerRequest.java
@@ -40,6 +40,7 @@ import org.springframework.http.HttpRange; import org.springframework.http.HttpRequest; import org.springframework.http.MediaType; +import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.codec.multipart.Part; import org.springframework.http.server.PathContainer; ...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequest.java
@@ -120,6 +120,11 @@ public Optional<InetSocketAddress> remoteAddress() { return Optional.ofNullable(request().getRemoteAddress()); } + @Override + public List<HttpMessageReader<?>> messageReaders() { + return this.messageReaders; + } + @Override public <T> T body(BodyExtractor<T, ? super ServerHttpRequest>...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequestBuilder.java
@@ -0,0 +1,444 @@ +/* + * Copyright 2002-2018 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 +...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java
@@ -40,13 +40,15 @@ import org.springframework.http.HttpCookie; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; +import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.codec.multipart.Part; import org.springframework.http.server.PathContainer...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java
@@ -25,11 +25,13 @@ import java.util.Map; import java.util.Optional; import java.util.OptionalLong; +import java.util.function.Consumer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.core.ParameterizedTypeReference; +import org.springframework.core.io.buffe...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/support/ServerRequestWrapper.java
@@ -35,13 +35,15 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpRange; import org.springframework.http.MediaType; +import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.codec.multipart.Part; import org.springframework.http.server.PathContainer;...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestBuilderTests.java
@@ -0,0 +1,81 @@ +/* + * Copyright 2002-2018 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + ...
true
Other
spring-projects
spring-framework
22edab852da456bea728daf84df09f0047e1d13f.json
Provide simple way to create ServerRequest This commit introduces support for creating a new `ServerRequest` from an existing instance. This is especially useful when filtering requests in a HandlerFilterFunction. Issue: SPR-16707
spring-webflux/src/test/java/org/springframework/web/reactive/function/server/MockServerRequest.java
@@ -40,6 +40,7 @@ import org.springframework.http.HttpRange; import org.springframework.http.HttpRequest; import org.springframework.http.MediaType; +import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.codec.multipart.Part; import org.springframework.http.server.PathContainer; ...
true
Other
spring-projects
spring-framework
6545cab42c238170f770b1e574088238574275e9.json
Improve performance of StringUtils#trimWhitespace Issue: SPR-16766
spring-core/src/main/java/org/springframework/util/StringUtils.java
@@ -209,14 +209,18 @@ public static String trimWhitespace(String str) { return str; } - StringBuilder sb = new StringBuilder(str); - while (sb.length() > 0 && Character.isWhitespace(sb.charAt(0))) { - sb.deleteCharAt(0); + int beginIndex = 0; + int endIndex = str.length() - 1; + + while (beginIndex <= e...
false
Other
spring-projects
spring-framework
e51330e905473d2f193f667dbf4b93207a6454d3.json
Keep YAML entries that haven an empty array value Prior to this commit, a YAML entry that define an empty array value was lost. This commit makes sure to flag it with an empty String, which corresponds as an empty comma separated list of entries in the properties format. Issue: SPR-16769
spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java
@@ -293,10 +293,14 @@ else if (value instanceof Collection) { // Need a compound key @SuppressWarnings("unchecked") Collection<Object> collection = (Collection<Object>) value; - int count = 0; - for (Object object : collection) { - buildFlattenedMap(result, - Collections.singletonMap("[" ...
true
Other
spring-projects
spring-framework
e51330e905473d2f193f667dbf4b93207a6454d3.json
Keep YAML entries that haven an empty array value Prior to this commit, a YAML entry that define an empty array value was lost. This commit makes sure to flag it with an empty String, which corresponds as an empty comma separated list of entries in the properties format. Issue: SPR-16769
spring-beans/src/test/java/org/springframework/beans/factory/config/YamlMapFactoryBeanTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import java.io.IOException; ...
true
Other
spring-projects
spring-framework
e51330e905473d2f193f667dbf4b93207a6454d3.json
Keep YAML entries that haven an empty array value Prior to this commit, a YAML entry that define an empty array value was lost. This commit makes sure to flag it with an empty String, which corresponds as an empty comma separated list of entries in the properties format. Issue: SPR-16769
spring-beans/src/test/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBeanTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -207,6 +207,15 @@ public void testLoadNull()...
true
Other
spring-projects
spring-framework
d979bbad2db223ae8a72697b484418d3dc29b554.json
Expose AspectJ 1.9.1 in Maven POMs Includes upgrade to Hibernate ORM 5.2.17 for integration tests. Issue: SPR-16780
build.gradle
@@ -41,7 +41,7 @@ configure(allprojects) { project -> group = "org.springframework" version = qualifyVersionIfNecessary(version) - ext.aspectjVersion = "1.8.13" + ext.aspectjVersion = "1.9.1" ext.freemarkerVersion = "2.3.28" ext.groovyVersion = "2.4.15" ext.hsqldbVersion = "2.4....
true
Other
spring-projects
spring-framework
d979bbad2db223ae8a72697b484418d3dc29b554.json
Expose AspectJ 1.9.1 in Maven POMs Includes upgrade to Hibernate ORM 5.2.17 for integration tests. Issue: SPR-16780
spring-aspects/spring-aspects.gradle
@@ -80,9 +80,9 @@ compileTestJava { dependencies { aspects(project(":spring-orm")) - ajc("org.aspectj:aspectjtools:1.9.0") // for JDK 9+ build compatibility - rt("org.aspectj:aspectjrt:1.9.0") // for JDK 9+ build compatibility - compile("org.aspectj:aspectjweaver:${aspectjVersion}") // for Maven POM exposure + ...
true
Other
spring-projects
spring-framework
d979bbad2db223ae8a72697b484418d3dc29b554.json
Expose AspectJ 1.9.1 in Maven POMs Includes upgrade to Hibernate ORM 5.2.17 for integration tests. Issue: SPR-16780
spring-test/spring-test.gradle
@@ -65,7 +65,7 @@ dependencies { testCompile("javax.ejb:javax.ejb-api:3.2") testCompile("javax.interceptor:javax.interceptor-api:1.2.1") testCompile("javax.mail:javax.mail-api:1.6.1") - testCompile("org.hibernate:hibernate-core:5.2.16.Final") + testCompile("org.hibernate:hibernate-core:5.2.17.Final") testCompil...
true
Other
spring-projects
spring-framework
5b8c6c46e16c3268bb48632c59d8e8e2b3ef2ada.json
Fix broken anchor link in WebFlux refdoc
src/docs/asciidoc/web-reactive.adoc
@@ -10,7 +10,7 @@ This part of the documentation covers support for reactive stack, web applications built on a http://www.reactive-streams.org/[Reactive Streams] API to run on non-blocking servers such as Netty, Undertow, and Servlet 3.1+ containers. Individual chapters cover -the <<webflux-module,Spring WebFlux>> ...
false
Other
spring-projects
spring-framework
d44f1ca2daec03b0ff0023da580e176d753a5426.json
Fix typos in Spring MVC refdoc 1. Consistent with "xml code" examples. 2. "xml()" is a static method and will use default builder config, so use createXmlMapper(true) instead. 3. Fix mvc namespace tag typo.
src/docs/asciidoc/web/webmvc.adoc
@@ -4162,6 +4162,7 @@ In Java config, customize requested content type resolution: @Override public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { configurer.mediaType("json", MediaType.APPLICATION_JSON); + configurer.mediaType("xml", MediaType.APPLICATION_XML); } } ---- @...
false
Other
spring-projects
spring-framework
0e776d4e77c95bfdd2236b542c784032d6c12142.json
Add more detail to ISE in ServerEndpointExporter Issue: SPR-16655
spring-websocket/src/main/java/org/springframework/web/socket/server/standard/ServerEndpointExporter.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -143,7 +143,11 @@ protected void registerEnd...
false
Other
spring-projects
spring-framework
919f54b3f6d3b4a562ccdcdc6bc64817cbb55a40.json
Upgrade Kotlin to 1.2.40
build.gradle
@@ -14,7 +14,7 @@ buildscript { plugins { id "com.gradle.build-scan" version "1.8" id "io.spring.dependency-management" version "1.0.3.RELEASE" apply false - id "org.jetbrains.kotlin.jvm" version "1.2.31" apply false + id "org.jetbrains.kotlin.jvm" version "1.2.40" apply false id "org.jetbrains.dokka" version "0...
false
Other
spring-projects
spring-framework
fb0e3e935638e866b39429faddec2c187c356384.json
Fix a typo in @Nullable Javadoc
spring-core/src/main/java/org/springframework/lang/Nullable.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ * <p>Should be used at para...
false
Other
spring-projects
spring-framework
032096d699751ab2d0f5715e037fcb9306625ef2.json
Add checkstyle to build Add checkstyle to the build to enforce Spring Framework coding conventions. Rule suppressions are used for several classes where relaxing the rules makes more sense than fixing them. Issue: SPR-16968
build.gradle
@@ -64,6 +64,7 @@ configure(allprojects) { project -> apply plugin: "test-source-set-dependencies" apply plugin: "io.spring.dependency-management" apply from: "${gradleScriptDir}/ide.gradle" + apply plugin: "checkstyle" dependencyManagement { resolutionStrategy { @@ -75,6 +76,11 @@ configure(allprojects) {...
true
Other
spring-projects
spring-framework
032096d699751ab2d0f5715e037fcb9306625ef2.json
Add checkstyle to build Add checkstyle to the build to enforce Spring Framework coding conventions. Rule suppressions are used for several classes where relaxing the rules makes more sense than fixing them. Issue: SPR-16968
src/checkstyle/checkstyle-suppressions.xml
@@ -0,0 +1,78 @@ +<?xml version="1.0"?> +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Suppressions 1.1//EN" + "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> +<suppressions> + + <!-- global --> + <suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks=".*" /> + <suppress files="ValueConstants" che...
true
Other
spring-projects
spring-framework
032096d699751ab2d0f5715e037fcb9306625ef2.json
Add checkstyle to build Add checkstyle to the build to enforce Spring Framework coding conventions. Rule suppressions are used for several classes where relaxing the rules makes more sense than fixing them. Issue: SPR-16968
src/checkstyle/checkstyle.xml
@@ -0,0 +1,156 @@ +<?xml version="1.0"?> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="com.puppycrawl.tools.checkstyle.Checker"> + <!-- Supressions --> + <module name="SuppressionFilter"> + <property name="file" value="...
true
Other
spring-projects
spring-framework
c14f83e7276d96ca103ae30a2aa55bc7edfc95f2.json
Fix Eclipse import order
src/eclipse/org.eclipse.jdt.ui.prefs
@@ -55,7 +55,7 @@ eclipse.preferences.version=1 formatter_profile=_Spring formatter_settings_version=12 org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=java;javax;;org.springframework;\#; +org.eclipse.jdt.ui.importorder=java;javax;com;org;;org.springframework;\#; org.eclipse.jdt.ui.java...
false
Other
spring-projects
spring-framework
df38af361c512c1be2f725611bc1543c836f6345.json
Fix broken link to CONTRIBUTING.md Closes gh-1860
src/docs/asciidoc/overview.adoc
@@ -133,7 +133,7 @@ that, for all but the most trivial issues, we expect a ticket to be filed in the tracker, where discussions take place and leave a record for future reference. For more details see the guidelines at the -https://github.com/spring-projects/spring-framework/blob/master/CONTRIBUTING.adoc[CONTRIBUTI...
false
Other
spring-projects
spring-framework
03c305136df7a9bda0b2b8f4db0cf7e18083913e.json
Fix failing tests
spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java
@@ -88,7 +88,8 @@ public void noHandler() throws Exception { StepVerifier.create(publisher) .consumeErrorWith(error -> { assertThat(error, instanceOf(ResponseStatusException.class)); - assertThat(error.getMessage(), is("Response status 404 with reason \"No matching handler\"")); + assertThat(error...
true
Other
spring-projects
spring-framework
03c305136df7a9bda0b2b8f4db0cf7e18083913e.json
Fix failing tests
spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java
@@ -176,7 +176,7 @@ public void resolverThrowsException() throws Exception { fail("Expected UnsupportedMediaTypeStatusException"); } catch (UnsupportedMediaTypeStatusException ex) { - assertThat(ex.getMessage(), is("Response status 415 with reason \"boo\"")); + assertThat(ex.getMessage(), is("Response sta...
true
Other
spring-projects
spring-framework
03c305136df7a9bda0b2b8f4db0cf7e18083913e.json
Fix failing tests
spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java
@@ -170,8 +170,8 @@ public void getHandlerTestInvalidContentType() { Mono<Object> mono = this.handlerMapping.getHandler(exchange); assertError(mono, UnsupportedMediaTypeStatusException.class, - ex -> assertEquals("Response status 415 with reason \"Invalid mime type \"bogus\": " + - "does not contain '...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/http/CacheControl.java
@@ -304,4 +304,8 @@ private void appendDirective(StringBuilder builder, String value) { builder.append(value); } + @Override + public String toString() { + return "CacheControl [" + getHeaderValue() + "]"; + } }
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/http/HttpStatus.java
@@ -504,7 +504,7 @@ public Series series() { */ @Override public String toString() { - return Integer.toString(this.value); + return Integer.toString(this.value) + " " + name(); }
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/accept/AbstractMappingContentNegotiationStrategy.java
@@ -138,9 +138,6 @@ public List<MediaType> resolveMediaTypeKey(NativeWebRequest webRequest, @Nullabl * {@link #lookupMediaType}. */ protected void handleMatch(String key, MediaType mediaType) { - if (logger.isTraceEnabled()) { - logger.trace("Requested MediaType='" + mediaType + "' based on key='" + key + "'...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java
@@ -69,9 +69,6 @@ public List<MediaType> getContentTypes() { @Override public List<MediaType> resolveMediaTypes(NativeWebRequest request) { - if (logger.isDebugEnabled()) { - logger.debug("Requested media types: " + this.contentTypes); - } return this.contentTypes; }
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategy.java
@@ -87,7 +87,6 @@ public void setUseJaf(boolean useJaf) { protected String getMediaTypeKey(NativeWebRequest webRequest) { HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class); if (request == null) { - logger.warn("An HttpServletRequest is required to determine the media type key"...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/bind/MethodArgumentNotValidException.java
@@ -61,10 +61,13 @@ public BindingResult getBindingResult() { @Override public String getMessage() { - StringBuilder sb = new StringBuilder("Validation failed for argument at index ") - .append(this.parameter.getParameterIndex()).append(" in method: ") - .append(this.parameter.getExecutable().toGenericString...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/context/request/async/CallableInterceptorChain.java
@@ -72,13 +72,13 @@ public Object applyPostProcess(NativeWebRequest request, Callable<?> task, Objec try { this.interceptors.get(i).postProcess(request, task, concurrentResult); } - catch (Throwable t) { + catch (Throwable ex) { // Save the first exception but invoke all interceptors if (exce...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultInterceptorChain.java
@@ -65,8 +65,8 @@ public Object applyPostProcess(NativeWebRequest request, DeferredResult<?> defe this.interceptors.get(i).postProcess(request, deferredResult, concurrentResult); } } - catch (Throwable t) { - return t; + catch (Throwable ex) { + return ex; } return concurrentResult; } @@ -105...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java
@@ -290,15 +290,15 @@ public void startCallableProcessing(final WebAsyncTask<?> webAsyncTask, Object.. final CallableInterceptorChain interceptorChain = new CallableInterceptorChain(interceptors); this.asyncWebRequest.addTimeoutHandler(() -> { - logger.debug("Processing timeout"); + logger.debug("Async requ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java
@@ -68,13 +68,13 @@ public boolean processRequest(@Nullable CorsConfiguration config, HttpServletReq ServletServerHttpResponse serverResponse = new ServletServerHttpResponse(response); if (responseHasCors(serverResponse)) { - logger.debug("Skip CORS processing: response already contains \"Access-Control-Allow...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java
@@ -26,6 +26,7 @@ import org.springframework.lang.Nullable; import org.springframework.util.ClassUtils; import org.springframework.util.ReflectionUtils; +import org.springframework.util.StringUtils; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.support.SessionStatus; impor...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsFileUploadSupport.java
@@ -281,10 +281,15 @@ protected MultipartParsingResult parseFileItems(List<FileItem> fileItems, String // multipart file field CommonsMultipartFile file = createMultipartFile(fileItem); multipartFiles.add(file.getName(), file); - if (logger.isDebugEnabled()) { - logger.debug("Found multipart file ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java
@@ -165,14 +165,19 @@ public void transferTo(File dest) throws IOException, IllegalStateException { try { this.fileItem.write(dest); - if (logger.isDebugEnabled()) { + if (logger.isDebugEnabled() || logger.isTraceEnabled()) { String action = "transferred"; if (!this.fileItem.isInMemory()) { ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java
@@ -106,16 +106,15 @@ protected void doFilterInternal( HttpServletRequest processedRequest = request; if (multipartResolver.isMultipart(processedRequest)) { - if (logger.isDebugEnabled()) { - logger.debug("Resolving multipart request [" + processedRequest.getRequestURI() + - "] with MultipartFilter");...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java
@@ -93,7 +93,7 @@ public void cannotResolveArg() throws Exception { fail("Expected exception"); } catch (IllegalStateException ex) { - assertTrue(ex.getMessage().contains("No suitable resolver for argument 0 of type 'java.lang.Integer'")); + assertTrue(ex.getMessage().contains("Could not resolve parameter...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
@@ -18,6 +18,7 @@ import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; @@ -28,6 +29,8 @@ import java.util.Map; import java.util.Properties; import java.util.Set; +import java.util.stream.Collecto...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
@@ -43,6 +43,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; import org.springframework.lang.Nullable; import org.springframework.uti...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java
@@ -17,6 +17,7 @@ package org.springframework.web.servlet; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -202,21 +203,23 @@ void applyAfterConcurrentHandlingStarted(HttpServletRequest re...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java
@@ -146,8 +146,8 @@ protected ConfigurableEnvironment createEnvironment() { */ @Override public final void init() throws ServletException { - if (logger.isDebugEnabled()) { - logger.debug("Initializing servlet '" + getServletName() + "'"); + if (logger.isTraceEnabled()) { + logger.trace("Initializing servl...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndView.java
@@ -352,15 +352,11 @@ public boolean wasCleared() { */ @Override public String toString() { - StringBuilder sb = new StringBuilder("ModelAndView: "); - if (isReference()) { - sb.append("reference to view with name '").append(this.view).append("'"); - } - else { - sb.append("materialized View is [").appen...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractDetectingUrlHandlerMapping.java
@@ -69,9 +69,6 @@ public void initApplicationContext() throws ApplicationContextException { */ protected void detectHandlers() throws BeansException { ApplicationContext applicationContext = obtainApplicationContext(); - if (logger.isDebugEnabled()) { - logger.debug("Looking for URL mappings in application c...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java
@@ -132,12 +132,14 @@ public ModelAndView resolveException( HttpServletRequest request, HttpServletResponse response, @Nullable Object handler, Exception ex) { if (shouldApplyTo(request, handler)) { - if (this.logger.isDebugEnabled()) { - this.logger.debug("Resolving exception from handler [" + handler + ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
@@ -26,6 +26,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactoryUtils; +import org.springframework.beans.factory.BeanNameAware; import org.springframework.core.Ordered; import org.springframework.lang.Nullable; import org.springframework.util.AntPathMatcher;...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java
@@ -31,6 +31,9 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.BeanFactoryUtils; import org.sp...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java
@@ -22,7 +22,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -142,12 +141,6 @@ protected Object getHandlerInternal(HttpServletRequest request) throws Exception handler = buildP...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java
@@ -226,8 +226,7 @@ protected String determineViewName(Exception ex, HttpServletRequest request) { // Return default error view else, if defined. if (viewName == null && this.defaultErrorView != null) { if (logger.isDebugEnabled()) { - logger.debug("Resolving to default view '" + this.defaultErrorView + "'...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java
@@ -16,9 +16,12 @@ package org.springframework.web.servlet.handler; +import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; import java.util.Properties; +import java.util.Set; import org.springframework.beans.BeansException; import org.springframework.util....
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java
@@ -205,20 +205,20 @@ private void parseLocaleCookieIfNecessary(HttpServletRequest request) { } } catch (IllegalArgumentException ex) { + String reason = "Ignoring invalid locale cookie '" + + cookieName + ":" + value + "' due to: " + ex.getMessage(); if (request.getAttribute(WebUt...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractUrlViewController.java
@@ -100,10 +100,9 @@ protected UrlPathHelper getUrlPathHelper() { */ @Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) { - String lookupPath = getUrlPathHelper().getLookupPathForRequest(request); String viewName = getViewNameForRequest(request); ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java
@@ -67,7 +67,16 @@ public void setViewName(@Nullable String viewName) { */ @Nullable public String getViewName() { - return (this.view instanceof String ? (String) this.view : null); + if (this.view instanceof String) { + String viewName = (String) this.view; + if (getStatusCode() != null && getStatusCode(...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java
@@ -132,15 +132,15 @@ protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpSer // If already included, include again, else forward. if (useInclude(request, response)) { rd.include(request, response); - if (logger.isDebugEnabled()) { - logger.debug("Included servlet [" + this.servl...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java
@@ -170,27 +170,24 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons checkRequest(request); String lookupPath = this.urlPathHelper.getLookupPathForRequest(request); - if (logger.isDebugEnabled()) { - logger.debug("Looking up cache seconds for [" + lookupPath + "]"); - } ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java
@@ -86,7 +86,7 @@ protected ModelAndView doResolveException( } } catch (Exception resolveEx) { - logger.warn("ResponseStatus handling resulted in exception", resolveEx); + logger.warn("Failure while trying to resolve exception [" + ex.getClass().getName() + "]", resolveEx); } return null; }
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodArgumentResolver.java
@@ -197,9 +197,6 @@ protected <T> Object readWithMessageConverters(HttpInputMessage inputMessage, Me (converter instanceof GenericHttpMessageConverter ? (GenericHttpMessageConverter<?>) converter : null); if (genericConverter != null ? genericConverter.canRead(targetType, contextClass, contentType) : ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java
@@ -177,18 +177,18 @@ protected <T> void writeWithMessageConverters(@Nullable T value, MethodParameter ServletServerHttpRequest inputMessage, ServletServerHttpResponse outputMessage) throws IOException, HttpMediaTypeNotAcceptableException, HttpMessageNotWritableException { - Object outputValue; + Object bod...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java
@@ -269,9 +269,6 @@ private void initExceptionHandlerAdviceCache() { if (getApplicationContext() == null) { return; } - if (logger.isDebugEnabled()) { - logger.debug("Looking for exception mappings: " + getApplicationContext()); - } List<ControllerAdviceBean> adviceBeans = ControllerAdviceBean.findAn...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java
@@ -68,7 +68,7 @@ protected void addBindValues(MutablePropertyValues mpvs, ServletRequest request) if (mpvs.contains(name)) { if (logger.isWarnEnabled()) { logger.warn("Skipping URI variable '" + name + - "' since the request contains a bind value with the same name."); + "' because requ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java
@@ -583,8 +583,8 @@ private static String getClassMapping(Class<?> controllerType) { if (ObjectUtils.isEmpty(paths) || StringUtils.isEmpty(paths[0])) { return "/"; } - if (paths.length > 1 && logger.isWarnEnabled()) { - logger.warn("Multiple paths on controller " + controllerType.getName() + ", using first...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ReactiveTypeHandler.java
@@ -211,12 +211,12 @@ protected ResponseBodyEmitter getEmitter() { @Override public final void onSubscribe(Subscription subscription) { this.subscription = subscription; - if (logger.isDebugEnabled()) { - logger.debug("Subscribed to Publisher for " + this.emitter); + if (logger.isTraceEnabled()) { + ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
@@ -570,9 +570,6 @@ private void initControllerAdviceCache() { if (getApplicationContext() == null) { return; } - if (logger.isInfoEnabled()) { - logger.info("Looking for @ControllerAdvice: " + getApplicationContext()); - } List<ControllerAdviceBean> adviceBeans = ControllerAdviceBean.findAnnotatedBe...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyAdviceChain.java
@@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; import org.springframework.core.MethodParameter; import org.springframework.http.HttpInputMessage; @@ -52,20 +53,24 @@ class RequestResponseBodyAdviceChain implements RequestBod...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterReturnValueHandler.java
@@ -193,7 +193,9 @@ public void send(Object data, @Nullable MediaType mediaType) throws IOException @SuppressWarnings("unchecked") private <T> void sendInternal(T data, @Nullable MediaType mediaType) throws IOException { if (logger.isTraceEnabled()) { - logger.trace("Writing [" + data + "]"); + String f...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java
@@ -18,7 +18,6 @@ import java.util.List; import java.util.Set; -import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; @@ -434,11 +433,10 @@ protected ResponseEntity<Object> handleAsyncRequestTimeoutException( if (webRequest insta...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethod.java
@@ -121,7 +121,7 @@ else if (StringUtils.hasText(getResponseStatusReason())) { } catch (Exception ex) { if (logger.isTraceEnabled()) { - logger.trace(getReturnValueHandlingErrorMessage("Error handling return value", returnValue), ex); + logger.trace(formatErrorForReturnValue("Error handling return value...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java
@@ -227,13 +227,15 @@ else if (ex instanceof AsyncRequestTimeoutException) { return handleAsyncRequestTimeoutException( (AsyncRequestTimeoutException) ex, request, response, handler); } - } - catch (Exception handlerException) { - if (logger.isWarnEnabled()) { - logger.warn("Handling of [" + ex.g...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AbstractResourceResolver.java
@@ -42,9 +42,6 @@ public abstract class AbstractResourceResolver implements ResourceResolver { public Resource resolveResource(@Nullable HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) { - if (logger.isTraceEnabled()) { - logger.trace("Resolvin...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java
@@ -109,15 +109,11 @@ public Resource transform(HttpServletRequest request, Resource resource, if (!content.startsWith(MANIFEST_HEADER)) { if (logger.isTraceEnabled()) { - logger.trace("Manifest should start with 'CACHE MANIFEST', skip: " + resource); + logger.trace("Skipping " + resource + ": Manifest d...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceResolver.java
@@ -110,16 +110,13 @@ protected Resource resolveResourceInternal(@Nullable HttpServletRequest request, if (resource != null) { if (logger.isTraceEnabled()) { - logger.trace("Found match: " + resource); + logger.trace("Resource resolved from cache"); } return resource; } resource = chain.r...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceTransformer.java
@@ -72,16 +72,12 @@ public Resource transform(HttpServletRequest request, Resource resource, Resourc Resource transformed = this.cache.get(resource, Resource.class); if (transformed != null) { if (logger.isTraceEnabled()) { - logger.trace("Found match: " + transformed); + logger.trace("Resource resolved...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java
@@ -76,10 +76,6 @@ public Resource transform(HttpServletRequest request, Resource resource, Resourc return resource; } - if (logger.isTraceEnabled()) { - logger.trace("Transforming resource: " + resource); - } - byte[] bytes = FileCopyUtils.copyToByteArray(resource.getInputStream()); String content =...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/GzipResourceResolver.java
@@ -61,7 +61,7 @@ protected Resource resolveResourceInternal(@Nullable HttpServletRequest request, } } catch (IOException ex) { - logger.trace("No gzipped resource for [" + resource.getFilename() + "]", ex); + logger.trace("No gzip resource for [" + resource.getFilename() + "]", ex); } return reso...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java
@@ -150,23 +150,14 @@ private Resource getResource(String resourcePath, @Nullable HttpServletRequest r for (Resource location : locations) { try { - if (logger.isTraceEnabled()) { - logger.trace("Checking location: " + location); - } String pathToUse = encodeIfNecessary(resourcePath, request, lo...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
@@ -21,9 +21,11 @@ import java.net.URLDecoder; import java.nio.charset.Charset; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import javax.servlet.ServletException; import javax.servlet.http....
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java
@@ -80,7 +80,8 @@ public ResourceUrlEncodingResponseWrapper(HttpServletRequest request, HttpServle public String encodeURL(String url) { ResourceUrlProvider resourceUrlProvider = getResourceUrlProvider(); if (resourceUrlProvider == null) { - logger.debug("Request attribute exposing ResourceUrlProvider not...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java
@@ -129,9 +129,6 @@ public void onApplicationEvent(ContextRefreshedEvent event) { if (isAutodetect()) { this.handlerMap.clear(); detectResourceHandlers(event.getApplicationContext()); - if (this.handlerMap.isEmpty() && logger.isDebugEnabled()) { - logger.debug("No resource handling mappings found"); - ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java
@@ -169,32 +169,22 @@ protected Resource resolveResourceInternal(@Nullable HttpServletRequest request, String candidateVersion = versionStrategy.extractVersion(requestPath); if (StringUtils.isEmpty(candidateVersion)) { - if (logger.isTraceEnabled()) { - logger.trace("No version found in path \"" + requestP...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/support/AbstractFlashMapManager.java
@@ -95,19 +95,13 @@ public final FlashMap retrieveAndUpdate(HttpServletRequest request, HttpServletR return null; } - if (logger.isDebugEnabled()) { - logger.debug("Retrieved FlashMap(s): " + allFlashMaps); - } List<FlashMap> mapsToRemove = getExpiredFlashMaps(allFlashMaps); FlashMap match = getMatch...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java
@@ -164,17 +164,23 @@ public View resolveViewName(String viewName, Locale locale) throws Exception { if (view != null) { this.viewAccessCache.put(cacheKey, view); this.viewCreationCache.put(cacheKey, view); - if (logger.isTraceEnabled()) { - logger.trace("Cached view [" + cacheKey + ...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractTemplateView.java
@@ -17,6 +17,7 @@ package org.springframework.web.servlet.view; import java.util.Enumeration; +import java.util.LinkedHashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -115,6 +116,7 @@ protected final void renderMergedOutputModel( Map<Strin...
true
Other
spring-projects
spring-framework
28a5c3009ea0c31f879c0bb8b9e6cfd33faa81e5.json
Improve DEBUG/TRACE logging for Spring MVC Issue: SPR-16898
spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java
@@ -138,7 +138,8 @@ public void setAttributesCSV(@Nullable String propString) throws IllegalArgument String tok = st.nextToken(); int eqIdx = tok.indexOf('='); if (eqIdx == -1) { - throw new IllegalArgumentException("Expected = in attributes CSV string '" + propString + "'"); + throw new IllegalA...
true