Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get new #2

Open
wants to merge 10,000 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
42c15be
Upgrade to Kotlin 1.4.30
sdeleuze Feb 15, 2021
2fbfd8a
Avoid unnecessary wrapping for SqlParameterValue
quaff Jan 29, 2021
634c771
Remove trailing whitespace (Checkstyle)
jhoeller Feb 15, 2021
729535d
Ensure presence of cached lookupPath
rstoyanchev Feb 15, 2021
0fc8bf6
Expose DispatcherHandler as PreFlightRequestHandler
rstoyanchev Feb 15, 2021
9c6b1b6
Prevent kotlinx.serialization usage on collection of interfaces
sdeleuze Feb 15, 2021
da3ff29
Allow bypass of active/default properties
philwebb Jan 27, 2021
8807f94
Polish "Allow bypass of active/default properties"
snicoll Feb 15, 2021
86423c9
Merge branch 'gh-26461'
snicoll Feb 15, 2021
3524401
Introduce a NativeDetector utility class
sdeleuze Feb 15, 2021
d4c609f
Allow customer resolver and property sources
philwebb Jan 28, 2021
582559d
Polish "Allow customer resolver and property sources"
snicoll Feb 15, 2021
bc71cc1
Merge branch 'gh-26462'
snicoll Feb 15, 2021
7536b7f
Upgrade to Gradle 6.8.2
snicoll Feb 15, 2021
8de10e9
Accept nullable values in MapSqlParameterSource set operators
cadimmek Dec 16, 2020
ca8261c
Polishing
jhoeller Feb 15, 2021
3718c8d
Upgrade to Hibernate ORM 5.4.28 and OpenPDF 1.3.25
jhoeller Feb 15, 2021
b00c707
Introduce WebClient.ResponseSpec.awaitBodilessEntity()
gaerfield Feb 3, 2021
63db250
Upgrade to Reactor 2020.0.4
rstoyanchev Feb 15, 2021
29fb3f2
Fix typo in @Configurable example in reference manual
cprayer Feb 15, 2021
ff43731
Polish Resources section of the reference manual
sbrannen Feb 15, 2021
7225238
Update Resource interface in the reference manual
sbrannen Feb 15, 2021
c26087e
Document PathResource as a built-in Resource in the reference manual
sbrannen Feb 15, 2021
6b70544
Document ResourcePatternResolver in the reference manual
sbrannen Feb 15, 2021
f48c3d9
Document ASM version as 9.x (effectively 9.1 at present)
jhoeller Feb 15, 2021
ed9ec58
Document ASM version as 9.1 in license file
jhoeller Feb 15, 2021
9417975
Nullability refinements
jhoeller Feb 16, 2021
36d133c
Escape URLs in literals in reference manual
sbrannen Feb 16, 2021
a315abf
Polish ResourcePatternResolver docuementation in the reference manual
sbrannen Feb 16, 2021
829000d
Remove Kotlin "translations" of Java APIs in the reference manual
sbrannen Feb 16, 2021
1e57e57
Link to all built-in `Resource` implementations
sbrannen Feb 16, 2021
efc335e
Remove remaining Kotlin "translations" of Java APIs in the reference …
sbrannen Feb 16, 2021
ff23456
Next development version (v5.3.5-SNAPSHOT)
spring-builds Feb 16, 2021
fd49c8f
Polishing
sbrannen Feb 16, 2021
7ca47cf
Fix build output dir for ref docs in CONTRIBUTING.md
cprayer Feb 16, 2021
4ebd8d7
Update link to AsciiDoc Tooling
sbrannen Feb 16, 2021
ac58614
Polish Resources section of the reference manual
sbrannen Feb 16, 2021
8776139
Document @Value support for Resource/Resource[] injection in ref docs
sbrannen Feb 17, 2021
e17ca9a
Implement toString() in MockCookie
sbrannen Feb 17, 2021
40661d6
Support cookie w/ only Expires attribute in MockHttpServletResponse
Feb 17, 2021
5b97c47
Sync changes in MockHttpServletResponse test fixture
sbrannen Feb 17, 2021
49ccd7a
Polish MockHttpServletResponseTests
sbrannen Feb 17, 2021
947387b
Fix ResourceUrlProvider handler auto-detection
bclozel Feb 17, 2021
a78701c
Fix Javadoc link in DynamicIntroductionAdvice
1993heqiang Feb 18, 2021
8535193
Update copyright date for DynamicIntroductionAdvice
sbrannen Feb 18, 2021
1dd7d53
More precise mapping for WebSocket handshake requests
rstoyanchev Feb 19, 2021
274db2f
Undo HttpServletMapping support in MockHttpServletRequest
rstoyanchev Feb 19, 2021
3215880
Remove Javadoc link to private method
sbrannen Feb 21, 2021
207ee9e
Polishing
sbrannen Feb 21, 2021
313e754
Support load-time weaving for @Component classes again
sbrannen Feb 22, 2021
dfc8406
Polish contribution
izeye Feb 22, 2021
a78c12b
Fix Javadoc for PlaceholderConfigurerSupport
sbrannen Feb 22, 2021
db5be44
Polishing
sbrannen Feb 22, 2021
90ee22f
Update reference manual regarding deprecated @Required annotation
alex-krav Feb 20, 2021
6d2fec3
Reduce focus on RequiredAnnotationBeanPostProcessor in ref docs
sbrannen Feb 22, 2021
42a223b
Upgrade to Gradle 6.8.3
sbrannen Feb 22, 2021
cf4e779
Fix MockHttpServletRequest reference in Javadoc
izeye Feb 23, 2021
77a658f
Fix registration of ApplicationStartupAware
bclozel Feb 23, 2021
f7cef2a
Remove section on RequiredAnnotationBeanPostProcessor in ref docs
sbrannen Feb 23, 2021
5b114b7
Cross reference DataClassRowMapper from BeanPropertyRowMapper
sbrannen Feb 23, 2021
cb3af52
Add vscode folder to .gitignore
lsq27 Feb 23, 2021
3ec0452
Dedicated, "_"-prefixed log category for request mappings
rstoyanchev Feb 22, 2021
962ec38
Improve Javadoc of ExchangeFunction
Feb 20, 2021
ec5774e
Polishing
rstoyanchev Feb 23, 2021
0fd774e
Add allowedOriginPatterns to WebSocketHandlerRegistration
rstoyanchev Feb 23, 2021
31d9f31
Polish Javadoc for @DateTimeFormat
sbrannen Feb 24, 2021
262b7d7
Polishing
sbrannen Feb 24, 2021
a9240e0
Document all supported SpringProperties keys in the reference manual
sbrannen Feb 24, 2021
eb68e6a
Support SUN as minimum of range in CronExpression
poutsma Feb 25, 2021
a33eac3
Correctly set auto-growing array's element
nullzl Feb 24, 2021
8baf404
Polish contribution
sbrannen Feb 25, 2021
e53cce0
Allow AOP proxies to be created using the original ClassLoader
jhoeller Feb 25, 2021
dee12db
getResource can throw IllegalArgumentException
candrews Feb 20, 2021
ebf6fff
Fix handling of file: paths to non-existent files
candrews Feb 20, 2021
b5147a0
Polishing
jhoeller Feb 25, 2021
aa73f67
Lenient treatment of malformed Accept header for @ExceptionHandler
rstoyanchev Feb 24, 2021
e04269c
Consistently check DispatcherType to avoid NPE in tests
rstoyanchev Feb 25, 2021
8ed7f47
Improve Javadoc for responseType on RestTemplate#exchange
rstoyanchev Feb 25, 2021
8c9c59e
Fix typo
rstoyanchev Feb 25, 2021
c2137a0
Cancel handling onError/Timeout in ServletHttpHandlerAdapter
rstoyanchev Feb 26, 2021
118d813
Add missing nullable annotation to ResponseEntity ok convenience method
kevin0x90 Feb 26, 2021
48bd813
Add javadoc for body parameter
jhoeller Feb 26, 2021
c084936
Upgrade to Jetty 9.4.37, Caffeine 2.9, Mockito 3.8, Checkstyle 8.40
jhoeller Feb 26, 2021
4af7a68
Polishing
jhoeller Feb 26, 2021
1a79c54
Support quoted boundary in DefaultPartHttpMessageReader
poutsma Mar 1, 2021
0087578
Fix @EventListener example in reference manual
alex-krav Mar 1, 2021
5a11569
Allow ServerHttpRequest content-type mutation
bclozel Mar 1, 2021
90de1ab
Ensure local @CrossOrigin maxAge overrides global value
GungnirLaevatain Feb 27, 2021
01c2e12
Polish contribution
sbrannen Mar 2, 2021
010b737
Fix typo in Javadoc
sbrannen Mar 2, 2021
e89cc99
Delete unused method
sbrannen Mar 2, 2021
7efb4ea
Delete unnecessary @SuppressWarnings declaration
sbrannen Mar 2, 2021
b61643b
Support UTF-16/UTF-32 in Jackson message converter
poutsma Mar 2, 2021
926c4aa
Improve formatting and link to 5.3.2 build pipeline
sbrannen Mar 3, 2021
1ee9223
Add section of CI builds
sbrannen Mar 3, 2021
b9a612b
Add RouterFunctionMapping to Javadoc for WebMvcConfigurationSupport
cprayer Mar 3, 2021
d23a108
Consolidate AsyncListener registration
rstoyanchev Mar 3, 2021
42e4ca1
Improve logging for Servlet / Reactive Streams adapters
rstoyanchev Mar 4, 2021
78f65c4
Consistent handling on Servlet non-blocking error callbacks
rstoyanchev Mar 4, 2021
c7e8989
Upgrade to Hibernate ORM 5.4.29, Jackson 2.12.2, Jetty 9.4.38, Jetty …
jhoeller Mar 4, 2021
acb638f
WriteResultPublisher propagates cancel upstream
rstoyanchev Mar 4, 2021
8bdc53a
Fix log message
rstoyanchev Mar 4, 2021
21d77dd
Fixed typo in ref docs
alex-krav Mar 4, 2021
75b6540
Specify 20 to the initial size of the ArrayList
chenqimiao Mar 4, 2021
9877a9e
Reduce memory consumption
chenqimiao Mar 4, 2021
86902d2
Expose id/getListenerId in base EventListener/ApplicationListener (pu…
jhoeller Mar 8, 2021
1ef8cad
Make use of Reactor Netty's ChannelOperationsId
rstoyanchev Mar 8, 2021
48688b7
Pass getListenerId call on to delegate
jhoeller Mar 8, 2021
530fb08
Polishing
jhoeller Mar 8, 2021
01bf1c9
Polishing
jhoeller Mar 8, 2021
70c0e10
Upgrade to Protobuf 3.15.5, Undertow 2.2.5, Woodstox 6.2.4
jhoeller Mar 8, 2021
5aef87f
Update reference to deprecated CronSequenceGenerator
MichelTenVoorde Mar 8, 2021
d308985
Polish "Update reference to deprecated CronSequenceGenerator"
snicoll Mar 9, 2021
4b80ef2
Merge pull request #26651 from MichelTenVoorde
snicoll Mar 9, 2021
3c9bd31
Move getListenerId method to Smart/GenericApplicationListener
jhoeller Mar 9, 2021
89f70bd
Upgrade to Netty 4.1.60, RxJava 3.0.11, JsonPath 2.5
jhoeller Mar 9, 2021
ed71fe0
Publish directly to Maven Central
bclozel Mar 9, 2021
f6d3d9d
Polish CI pipeline
snicoll Mar 10, 2021
61cdd64
Fix image name for JDK 15 build
snicoll Mar 10, 2021
2b017fe
Apply original ClassLoader in AbstractAdvisingBeanPostProcessor as well
jhoeller Mar 10, 2021
55aa8e9
Expose id from ClientHttpResponse
rstoyanchev Mar 10, 2021
6d4c009
Add application/*+xml to Jaxb2XmlEncoder
rstoyanchev Mar 10, 2021
5593e95
Do not assert thread count in ParallelApplicationEventsIntegrationTests
sbrannen Mar 11, 2021
b2bcb0f
Support multiple parsing patterns in @DateTimeFormat
sbrannen Mar 2, 2021
79b5710
StatusAssertion value methods fail when used with custom status code
MichalStehlikCz Mar 10, 2021
97b3aa4
Polishing
jhoeller Mar 11, 2021
c1b1940
Polishing
jhoeller Mar 12, 2021
14c802f
Introduced 'idleReceivesPerTaskLimit': also mark task idle when idle …
Jan 25, 2021
0503cf2
Revised checks for maxMessagesPerTask and idleReceivesPerTaskLimit
jhoeller Mar 12, 2021
1b458ae
Upgrade to ActiveMQ 5.16.1
jhoeller Mar 12, 2021
6ffeee3
Basic integration tests with various listener container settings
jhoeller Mar 12, 2021
7b6cac2
Polishing
jhoeller Mar 12, 2021
6670db9
Polishing
jhoeller Mar 12, 2021
2daefed
Polish
Rebwon Mar 13, 2021
12f8cdd
Update copyright year of changed files
snicoll Mar 13, 2021
9c030ba
Merge pull request #26673 from Rebwon
snicoll Mar 13, 2021
5c38b89
Fix Commons FileUpload URL in reference guide
1993heqiang Mar 15, 2021
a3451f9
Polish "Fix Commons FileUpload URL in reference guide"
snicoll Mar 15, 2021
8bf16ee
Merge pull request #26678 from 1993heqiang
snicoll Mar 15, 2021
c6b271f
Support global Consumer<ExchangeResult> in WebTestClient
rstoyanchev Mar 15, 2021
6214ff1
Public method to register MessagingAdviceBean
rstoyanchev Mar 12, 2021
6e264f9
Add test for global Consumer<ExchangeResult> in WebTestClient
rstoyanchev Mar 15, 2021
0eaf6d1
Add support for Oracle bind marker scheme using R2DBC
mp911de Mar 15, 2021
bc261fd
Remove duplicate word in Javadoc
drgnchan Mar 15, 2021
2728a9b
Polishing
Rebwon Mar 15, 2021
70f0895
Polish HeaderWebSessionIdResolverTests
sbrannen Mar 15, 2021
7f422f2
Polishing
Rebwon Mar 15, 2021
a8d5532
Introduce Gradle Toolchain support in build
bclozel Mar 12, 2021
7d3f42b
Expose endpoint id as listener container name (for transaction/thread…
jhoeller Mar 15, 2021
4f14291
Add since tag
jhoeller Mar 15, 2021
d92c74d
Add cookies to the WebSocket HandshakeInfo
sokomishalov Mar 14, 2021
b8d75c3
Polishing contribution
rstoyanchev Mar 15, 2021
684939d
Upgrade Kotlin to 1.4.31
sdeleuze Mar 16, 2021
f229fa4
Upgrade Kotlin Coroutines to 1.4.3
sdeleuze Mar 16, 2021
c0fee67
Upgrade Kotlin serialization to 1.0.1
sdeleuze Mar 16, 2021
5476b2e
Polishing contribution
rstoyanchev Mar 16, 2021
f674652
Next development version (v5.3.6-SNAPSHOT)
spring-builds Mar 16, 2021
fd17738
Polish TestContextAnnotationsUtilsTests
Rebwon Mar 16, 2021
14a6909
Fix release pipeline for Maven Central publication
bclozel Mar 16, 2021
3ab39ed
Fix Gradle Toolchain configuration
bclozel Mar 16, 2021
f7678cd
Polish core-beans.adoc
sbrannen Mar 16, 2021
4982b5f
Improve docs on SSE tests for Spring MVC
rstoyanchev Mar 16, 2021
e4f753e
Honor class-level @DirtiesContext if test class is disabled via SpEL
sbrannen Mar 18, 2021
a931ff1
MappedInterceptor falls back on PathMatcher
rstoyanchev Mar 19, 2021
41d5048
Add BlockHoundIntegration for spring-web
rstoyanchev Mar 22, 2021
5b227e5
Upgrade to Objenesis 3.2
jhoeller Mar 22, 2021
5b2ace5
Upgrade to Hibernate ORM 5.4.30, Tomcat 9.0.44, FreeMarker 2.3.31, Lo…
jhoeller Mar 22, 2021
610de3a
Upgrade to Concourse Release Scripts 0.3.2
bclozel Mar 23, 2021
2dc203f
Polish web docs example
Mar 26, 2021
1a95569
missingAfterConversion flag for missing request values
rstoyanchev Mar 25, 2021
5651695
Fix typo in Javadoc
rstoyanchev Mar 29, 2021
b651c10
Fix error messages to match commit #1a9556
rstoyanchev Mar 29, 2021
d83fb09
Change header encoding to UTF8 in DefaultPartHttpMessageReader
poutsma Mar 30, 2021
ab18ab6
Fix CronExpression issue with ZonedDateTime & DST
poutsma Mar 30, 2021
f982fd9
Fix timezone offset in CronExpressionTests
poutsma Mar 30, 2021
7dc3a55
Deferred buffer allocation in SSE message writer
rstoyanchev Mar 31, 2021
5e1e29a
Fix failing tests
rstoyanchev Mar 31, 2021
eca87b8
Improve Kotlin support in BridgeMethodResolver#findBridgedMethod
sdeleuze Apr 1, 2021
85dbd2a
Upgrade Kotlin to 1.4.32
sdeleuze Apr 1, 2021
58e40d1
Add awaitBodyOrNull to WebClient.ResponseSpec
ValentinShakhov Mar 25, 2021
aec151e
Add since to WebClient.ResponseSpec.awaitBodyOrNull()
izeye Apr 2, 2021
01bea34
Merge pull request #26755 from izeye
snicoll Apr 2, 2021
8a1182a
Additional validation for forwarded header address value
rstoyanchev Apr 6, 2021
fa4c62c
Start building against Reactor 2020.0.6 snapshots
snicoll Apr 7, 2021
c5ac8e8
Use createUnresolved for forwarded header address
rstoyanchev Apr 7, 2021
7dca6a3
Fix javadoc link syntax
KENNYSOFT Apr 8, 2021
7adac25
Update copyright year of changed file
snicoll Apr 8, 2021
44e1d6d
Merge pull request #26776 from KENNYSOFT
snicoll Apr 8, 2021
97f3846
Support "Accept-Patch" for OPTIONS requests
poutsma Apr 8, 2021
a2d91a5
Support "Accept-Patch" for unsupported media type
poutsma Apr 8, 2021
35ea33e
Update documentation for <context:annotation-config/>
hrybs Apr 9, 2021
a48c5f6
Update to Gradle Enterprise Gradle Plugin 3.6.1
runningcode Apr 9, 2021
d3d6e10
Merge pull request #26781 from runningcode
snicoll Apr 9, 2021
0f54585
Polish contribution
sbrannen Apr 9, 2021
f7606ba
Update ref docs regarding RequiredAnnotationBPP registration
hrybs Apr 9, 2021
432c720
Allow spring-expression to be more easily repackaged
BFergerson Apr 9, 2021
4e42b5d
Upgrade to Tomcat 9.0.45, Jetty 9.4.39, Undertow 2.2.7, Netty 4.1.63,…
jhoeller Apr 12, 2021
327e761
Recreate file storage directory when removed in DefaultPartHttpMessag…
poutsma Apr 12, 2021
22d9012
Retain root cause for parsing patterns in @DateTimeFormat
sbrannen Apr 12, 2021
7954dc7
Polish tests
Rebwon Mar 20, 2021
a08593b
Correct matching of static resources with parsed patterns
rstoyanchev Apr 12, 2021
0a6a6d4
Avoid CI failures with UTF-8 chars in test filenames
rstoyanchev Apr 12, 2021
ab0e8f0
Upgrade to Reactor 2020.0.6
rstoyanchev Apr 12, 2021
4b6b12b
Bypass root path resolution for "file:" prefix only
jhoeller Apr 12, 2021
29955a2
Polishing
jhoeller Apr 12, 2021
e05b584
Ignore testWindowsAbsoluteFilePath exception if not on Windows
jhoeller Apr 12, 2021
74f7eb1
Polish "Upgrade to Reactor 2020.0.6"
snicoll Apr 13, 2021
04ce8e0
Make URL path tests compatible with Windows
jhoeller Apr 13, 2021
a80c5fc
Improve @EventListener documentation in reference manual
hrybs Apr 10, 2021
bcc6171
Polish contribution
sbrannen Apr 13, 2021
f03ccd5
Fix Javadoc in AcceptHeaderLocaleResolver
sbrannen Apr 13, 2021
c7989c7
Polishing
jhoeller Apr 13, 2021
f31933e
Nullability refinements
jhoeller Apr 13, 2021
b73eb51
Next development version (v5.3.7-SNAPSHOT)
spring-builds Apr 13, 2021
27c4e74
Update CORS Javadoc in spring-websocket
rstoyanchev Apr 13, 2021
1694274
Remove leftover Javadoc from WebClient
mustafau Apr 14, 2021
5226a67
Update copyright year of changed file
snicoll Apr 15, 2021
63217e4
Merge pull request #26807 from mustafau
snicoll Apr 15, 2021
bf05da1
Remove unnecessary semicolon in BeanInfo example
hrybs Apr 14, 2021
5b1ab31
Polishing
sbrannen Apr 15, 2021
af06b80
Update FormatterRegistry interface in reference manual
hrybs Apr 15, 2021
320f583
Fix LocaleEditor description & formatting in reference manual
hrybs Apr 16, 2021
5d297c6
Polishing
sbrannen Apr 16, 2021
0f31830
Retain root cause for parsing patterns in @DateTimeFormat
sbrannen Apr 16, 2021
69bbdce
HandlerMappingIntrospector ensures initialized RequestPath
rstoyanchev Apr 16, 2021
e489706
Ensure @DateTimeFormat tests pass on Java 9+
sbrannen Apr 18, 2021
906a1f5
Polish CronTriggerTests and assess daylight savings time issue
sbrannen Apr 20, 2021
7303680
Remove reference to deprecated Joda Time support in @DateTimeFormat J…
hrybs Apr 20, 2021
71158f4
Polishing
sbrannen Apr 20, 2021
0286549
Fix formatting for PersonValidator Kotlin example in ref docs
hrybs Apr 20, 2021
e03fdea
Improve ref docs regarding @Bean method visibility constraints
hrybs Apr 20, 2021
ceac2a5
Remove reference to Commons Collections in ColumnMapRowMapper Javadoc
mdeinum Apr 20, 2021
1f477a5
Polish Javadoc for ColumnMapRowMapper
sbrannen Apr 20, 2021
b153b5e
Fix Kotlin code formatting for Inline Maps section of ref docs
hrybs Apr 21, 2021
27bfcbb
Fix daylight saving issue in CronExpression
poutsma Apr 20, 2021
db9a10b
Use String.startsWith() instead of substring() in PatternMatchUtils
stsypanov Apr 21, 2021
80d46ba
Update FactoryBean generic description in ref docs
hrybs Apr 21, 2021
5740eaf
Polishing
sbrannen Apr 21, 2021
d25ae4b
Add advice on using exchange from an ExchangeFilterFunction
rstoyanchev Apr 21, 2021
42a2309
Update docs on Principal controller method arguments
rstoyanchev Apr 21, 2021
d275a4e
Asciidoc typo from previous commits
rstoyanchev Apr 21, 2021
e7cbe23
Avoid exceptions when evaluating validation hints
dreis2211 Apr 11, 2021
e4c0ff5
Merge pull request #26787 from dreis2211
snicoll Apr 22, 2021
7f10621
Copy HttpStatus::values to prevent allocation
poutsma Apr 22, 2021
3bded76
Improve documentation for SpEL constructor support
hrybs Apr 22, 2021
6c3a0a9
Polishing
sbrannen Apr 22, 2021
01e50fb
Polish SpEL chapter
sbrannen Apr 22, 2021
7c3a184
Polish SpEL SelectionAndProjectionTests
sbrannen Apr 26, 2021
86123de
HandlerMappingIntrospector handles attribute changes properly
rstoyanchev Apr 22, 2021
b595dc1
Add advice on Spring MVC path matching for 5.3+
rstoyanchev Apr 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve Kotlin support in BridgeMethodResolver#findBridgedMethod
This commit adds support for Kotlin non-nullable type which resolves
to primitive Java types in BridgeMethodResolver#findBridgedMethod.

Closes spring-projectsgh-26585
sdeleuze committed Apr 1, 2021

Verified

This commit was signed with the committer’s verified signature.
iuwqyir Toomas Oosalu
commit eca87b87de8445feab00dd4e98a634ece6c80e20
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ private static boolean isResolvedTypeMatch(Method genericMethod, Method candidat
}
}
// A non-array type: compare the type itself.
if (!candidateParameter.equals(genericParameter.toClass())) {
if (!ClassUtils.resolvePrimitiveIfNecessary(candidateParameter).equals(ClassUtils.resolvePrimitiveIfNecessary(genericParameter.toClass()))) {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright 2002-2021 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.core

import org.assertj.core.api.Assertions
import org.junit.jupiter.api.Test

class KotlinBridgeMethodResolverTests {

@Test
fun findBridgedMethod() {
val unbridged = GenericRepository::class.java.getDeclaredMethod("delete", Int::class.java)
val bridged = GenericRepository::class.java.getDeclaredMethod("delete", Any::class.java)
Assertions.assertThat(unbridged.isBridge).isFalse
Assertions.assertThat(bridged.isBridge).isTrue

Assertions.assertThat(BridgeMethodResolver.findBridgedMethod(unbridged)).`as`("Unbridged method not returned directly").isEqualTo(unbridged)
Assertions.assertThat(BridgeMethodResolver.findBridgedMethod(bridged)).`as`("Incorrect bridged method returned").isEqualTo(unbridged)
}

@Test
fun findBridgedMethodWithArrays() {
val unbridged = GenericRepository::class.java.getDeclaredMethod("delete", Array<Int>::class.java)
val bridged = GenericRepository::class.java.getDeclaredMethod("delete", Array<Any>::class.java)
Assertions.assertThat(unbridged.isBridge).isFalse
Assertions.assertThat(bridged.isBridge).isTrue

Assertions.assertThat(BridgeMethodResolver.findBridgedMethod(unbridged)).`as`("Unbridged method not returned directly").isEqualTo(unbridged)
Assertions.assertThat(BridgeMethodResolver.findBridgedMethod(bridged)).`as`("Incorrect bridged method returned").isEqualTo(unbridged)
}
}

interface GenericInterface<ID> {
fun delete(id: ID)
fun delete(ids: Array<ID>)
}

abstract class AbstractGenericClass<ID> : GenericInterface<ID> {

override fun delete(id: ID) {
}

override fun delete(ids: Array<ID>) {
}
}

class GenericRepository : AbstractGenericClass<Int>() {

override fun delete(id: Int) {
error("gotcha")
}

override fun delete(ids: Array<Int>) {
error("gotcha")
}
}