Commit Graph

25231 Commits

Author SHA1 Message Date
Sébastien Deleuze 9a180d1811 Add JMH benchmarks
Closes gh-24104
2022-09-26 10:23:06 +02:00
Sébastien Deleuze 8e73b57329 Refine Kotlin changes
This refinement ensures the constructor is properly
accessible, avoid duplicating current logic and
provide a slightly faster implementation of the
Kotlin codepath.

See gh-24104
2022-09-26 10:22:46 +02:00
stsypanov edcc559b4a Add fast-path in BeanUtils#instantiateClass
For no-args constructor.

See gh-24104
2022-09-26 10:21:28 +02:00
Sébastien Deleuze 42ab1b75e7 Fix a regression in Kotlin serialization support
After gh-29068, some Type instances can throw an
IllegalArgumentException. This commit catches them
properly to just return a null serializer in that
case.

Closes gh-29192
2022-09-26 09:55:44 +02:00
Lars Grefer 94e5eb3eb6 Consider empty jar entries as readable
Prior to this commit, resource handling would not serve empty files and
return instead HTTP 404 responses. This would only happen for files
contained by JARs, but not on the filesystem.

This can be tracked to changes done in `AbstractFileResolvingResource`
where we avoid serving empty files for directories, see gh-21372.
This commit improves the `checkReadable` method to align this behavior
between file system and JAR files.

Closes gh-28850
2022-09-26 09:51:11 +02:00
Stephane Nicoll dfd1a31435 Merge branch '5.3.x' 2022-09-26 09:07:27 +02:00
Stephane Nicoll 433a23a0bd Merge pull request #29190 from dreis2211
* pr/29190:
  Polish "Avoid resizing of Maps created by CollectionUtils"
  Avoid resizing of Maps created by CollectionUtils

Closes gh-29190
2022-09-26 09:06:52 +02:00
Stephane Nicoll 7309fe9f2e Polish "Avoid resizing of Maps created by CollectionUtils"
See gh-29190
2022-09-26 09:00:45 +02:00
Christoph Dreis 874a296a76 Avoid resizing of Maps created by CollectionUtils
See gh-29190
2022-09-26 08:54:52 +02:00
Stephane Nicoll 82ae2a0326 Merge branch '5.3.x' 2022-09-26 08:53:14 +02:00
Stephane Nicoll d872e7c326 Merge pull request #29198 from izeye
* pr/29198:
  Use actions/checkout@v3 for Gradle Wrapper Validation Action

Closes gh-29198
2022-09-26 08:52:30 +02:00
Johnny Lim 4ca574cde1 Use actions/checkout@v3 for Gradle Wrapper Validation Action
See gh-29198
2022-09-26 08:52:21 +02:00
Stephane Nicoll 5275be3adf Merge branch '5.3.x' 2022-09-26 08:50:58 +02:00
Stephane Nicoll 98ecf0a412 Merge pull request #29201 from inabajunmr
* pr/29201:
  Fix MockMvc sample setup

Closes gh-29201
2022-09-26 08:50:49 +02:00
inaba jun ddef70935a Fix MockMvc sample setup
See gh-29201
2022-09-26 08:50:01 +02:00
Stephane Nicoll 86578e10f1 Merge pull request #29202 from izeye
* pr/29202:
  Polish "Deprecate support for theme" changes

Closes gh-29202
2022-09-26 08:47:09 +02:00
Johnny Lim 907c96b21e Polish "Deprecate support for theme" changes
See gh-29202
2022-09-26 08:46:19 +02:00
Sam Brannen f31eb2dcf9 Skip scanning the module path when running in a native image
Prior to this commit, the following exception was thrown when using the
PathMatchingResourcePatternResolver to scan for class path resources
using the `classpath*:` prefix within a native image.

com.oracle.svm.core.jdk.UnsupportedFeatureError: JRT file system is disabled
com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
jdk.internal.module.SystemModuleFinders$SystemImage.reader(SystemModuleFinders.java:139)
jdk.internal.module.SystemModuleFinders$ModuleContentSpliterator.<init>(SystemModuleFinders.java:527)
jdk.internal.module.SystemModuleFinders$SystemModuleReader.list(SystemModuleFinders.java:502)
org.springframework.core.io.support.PathMatchingResourcePatternResolver.lambda$findAllModulePathResources$6(PathMatchingResourcePatternResolver.java:819)

This commit addresses this by not attempting to scan the module path
when running in a GraalVM native image.

Closes gh-29183
2022-09-25 19:31:06 +02:00
Sam Brannen 6affae4120 Polish resourceArrayPropertyEditor() test 2022-09-25 19:31:06 +02:00
Sam Brannen 29442d4b7a Revamp PathMatchingResourcePatternResolverTests
In preparation for gh-29163, this commit revamps
PathMatchingResourcePatternResolverTests as follows.

- organizes tests into @Nested test classes

- reintroduces the @Disabled classpathStarWithPatternOnFileSystem() test

- stops asserting the protocol of Resource URLs, since the protocol is
  dependent on the environment -- for example, file: and jar: URLs are
  actually resource: URLs within a GraalVM native image

- simplifies implementation of test methods and assertFilenames()
2022-09-25 16:12:46 +02:00
rstoyanchev 57067f58e1 Polishing contribution
Closes gh-28401
2022-09-23 16:54:15 +01:00
rstoyanchev c2f1ddcee9 Consistent Nullable input in Hints 2022-09-23 16:54:15 +01:00
Laber, Jason M 27b5d141e2 Allow customization for ObjectReader and ObjectWriter
Allows customization from subclasses of
AbstractJackson2HttpMessageConverter, AbstractJackson2Decoder, and
AbstractJackson2Encoder

See gh-28401
2022-09-23 16:54:15 +01:00
rstoyanchev 74df50c906 Polishing ProblemDetail Javadoc 2022-09-23 16:54:02 +01:00
Andy Wilkinson a409e0fd2c Consider all processors when processing `@Reflective`
Previously, only the first occurance of `@Reflective` and its
processor was considered. When `@Reflective` appeared twice on a type
due to meta-annotations or inheritance, this resulted in other
processors being ignored and hints were missing as a result.

This commit updates ReflectiveRuntimeHintsRegistrar to consider
every occurance of `@Reflective` found in the type hierarchy,
and to then use the processors from each of them.

Fixes gh-29193
2022-09-23 16:31:35 +02:00
Stephane Nicoll c19cedede1 Revisit BeanRegistrationCodeFragments
This commit revisit BeanRegistrationCodeFragments to separate the
responsibility between the default implementation and the delegates. It
also reviews how customization are applied by improving the Javadoc and
the method name.

Closes gh-28865
2022-09-22 15:32:28 +02:00
Arjen Poutsma ef5b64dc00 Minor Javadoc correction 2022-09-22 12:26:16 +02:00
Stephane Nicoll 84fd942712 Add support for Charset for property value code generation
Closes gh-29186
2022-09-21 19:27:05 +02:00
rstoyanchev 5192d99fa4 Support formatting annotations on HTTP service interface
Closes gh-29095
2022-09-21 16:18:39 +01:00
Sébastien Deleuze 157c28bcec Enable HTTP and HTTPS on native in spring-web module
Closes gh-29185
2022-09-21 16:47:57 +02:00
Sébastien Deleuze 23a58e6bab Skip ModuleFinder#ofSystem usage on native
gh-28506 introduces a big footprint regression on
native, so it should for now be skipped when
compiling to native images. Such support could
potentially be re-introduced via gh-29081.

Closes gh-29183
2022-09-21 16:47:57 +02:00
Sam Brannen 39208eaccd Upgrade to JUnit 5.9.1
Closes gh-29179
2022-09-20 22:04:15 +02:00
Phillip Webb 6802665177 Refactor GeneratedFilesTestCompilerUtils to CompilerFiles
See gh-29175
2022-09-20 11:00:56 -07:00
Sébastien Deleuze 77fdd69cd1 Skip Javadoc generation for the GraalVM feature module
It is currently broken due to missing modules/exports
configuration and it is not a public API we want to document.

Closes gh-29178
2022-09-20 16:38:48 +02:00
Stephane Nicoll 4625e92eb8 Break dependency between TestCompiler and AOT
This commit improves `TestCompiler` with a `with` function that allows
to customize a test compiler instance. Rather than `TestCompiler`
knowing about `TestGenerationContext`, the latter implements the
function so that it can be passed as is.

See gh-29175
2022-09-20 15:07:51 +02:00
Stephane Nicoll 2f84096af1 Polish 2022-09-20 15:07:50 +02:00
Sam Brannen 321092ce6f Consistent use of @Deprecated(since = "6.0") 2022-09-20 14:34:24 +02:00
Sam Brannen 91bca55cbf Fix broken links to ThemeResolver in Javadoc 2022-09-20 14:33:55 +02:00
Sam Brannen f140464c12 Remove unused variable in test
See gh-28324
2022-09-20 13:51:39 +02:00
Sam Brannen 1263226928 Remove unused EMPTY_BUFFER constant
See gh-29038
2022-09-20 13:51:35 +02:00
Arjen Poutsma 990a34074a Upgrade RestTemplate to HttpClient 5
This commit upgrades the HttpComponentClientHttpRequestFactory and
related types from HttpClient version 4.5 to 5.

Closes gh-28925
2022-09-20 12:04:51 +02:00
Stephane Nicoll cc3616da66 Remove unnecessary import 2022-09-20 08:58:23 +02:00
Phillip Webb df9990f66b Relocate MockSpringFactoriesLoader
Closes gh-29176
2022-09-19 22:29:40 -07:00
Phillip Webb 52bffbff76 Move `TestCompiler` and related classes to `core.test.tools` package
Closes gh-29175
2022-09-19 22:29:40 -07:00
Scott Frederick c9009453c9 Allow TestCompiler to access and generate resources
Update `TestCompiler` so that it can access and generate resources.
This change will allow the `TestCompiler` to be used with annotation
processor tests that generate resources.

Closes gh-29174

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2022-09-19 22:29:40 -07:00
Phillip Webb cc7552ec61 Rename @CompileWithTargetClassAccess
Rename `@CompileWithTargetClassAccess` to
`@CompileWithForkedClassLoaderClassLoader`.

Closes gh-29173
2022-09-19 22:29:40 -07:00
Andy Wilkinson 7168141504 Allow TestCompiler to load cglib generated classes
Update `TestCompiler` so that it can now load cglib generated classes.
This commit adds support to `DynamicJavaFileManager` so that it can
reference generated classes and adds a new lookup function to
`CompileWithTargetClassAccessClassLoader` to that it can load the
bytecode of generated classes directly.

See gh-29141

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2022-09-19 22:29:36 -07:00
Alex 5277b1dbf0 Harden GitHub Workflows security settings
Closes gh-29171
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-19 14:24:57 +02:00
Brian Clozel 3e41d7f23e Remove extra asciidoctor configuration
See gh-29162
2022-09-19 13:00:42 +02:00
Arjen Poutsma fa5998ebd4 Trying to fix flaky CoroutinesIntegrationTests 2022-09-19 12:22:18 +02:00