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
daf2d940e4dac49bd1a1ce19e2ac112335cc27d1.json
Remove specific JDK dynamic proxy configuration Further refinements will be required for MethodValidationPostProcessor since @Lazy used by Spring Boot is not supported yet for that use case. See gh-28980
spring-tx/src/test/java/org/springframework/transaction/annotation/TransactionBeanRegistrationAotProcessorTests.java
@@ -18,8 +18,6 @@ import org.junit.jupiter.api.Test; -import org.springframework.aop.SpringProxy; -import org.springframework.aop.framework.Advised; import org.springframework.aot.generate.GenerationContext; import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.predicate.Runtim...
true
Other
spring-projects
spring-framework
38f94799f4bd53b68a1409b02152b1d960e1f838.json
Use andExpectAll() in example in MockMvc Javadoc
spring-test/src/main/java/org/springframework/test/web/servlet/MockMvc.java
@@ -56,9 +56,11 @@ * MockMvc mockMvc = webAppContextSetup(wac).build(); * * mockMvc.perform(get("/form")) - * .andExpect(status().isOk()) - * .andExpect(content().contentType("text/html")) - * .andExpect(forwardedUrl("/WEB-INF/layouts/main.jsp")); + * .andExpectAll( + * status().isOk(), + ...
false
Other
spring-projects
spring-framework
4264d0becd0ef614d52dd6384ef8e47cb88fb584.json
Fix example in MockMvc Javadoc
spring-test/src/main/java/org/springframework/test/web/servlet/MockMvc.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 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. @@ -57,7 +57,7 @@ * * mockMvc.perform(get("...
false
Other
spring-projects
spring-framework
4556895e6e97931c642e30c8c874b690708f2ea1.json
Expose registrar for @Reflective This commit exposes the logic of processing `@Reflective` on beans so that it can be reused in custom arrangements. Closes gh-28975
spring-context/src/main/java/org/springframework/context/aot/ReflectiveProcessorBeanFactoryInitializationAotProcessor.java
@@ -0,0 +1,68 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
4556895e6e97931c642e30c8c874b690708f2ea1.json
Expose registrar for @Reflective This commit exposes the logic of processing `@Reflective` on beans so that it can be reused in custom arrangements. Closes gh-28975
spring-context/src/main/resources/META-INF/spring/aot.factories
@@ -1,3 +1,5 @@ +org.springframework.beans.factory.aot.BeanFactoryInitializationAotProcessor= \ +org.springframework.context.aot.ReflectiveProcessorBeanFactoryInitializationAotProcessor + org.springframework.beans.factory.aot.BeanRegistrationAotProcessor= \ -org.springframework.context.aot.ReflectiveProcessorBeanRegis...
true
Other
spring-projects
spring-framework
4556895e6e97931c642e30c8c874b690708f2ea1.json
Expose registrar for @Reflective This commit exposes the logic of processing `@Reflective` on beans so that it can be reused in custom arrangements. Closes gh-28975
spring-context/src/test/java/org/springframework/context/aot/ReflectiveProcessorBeanFactoryInitializationAotProcessorTests.java
@@ -0,0 +1,107 @@ +/* + * Copyright 2002-2022 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 ...
true
Other
spring-projects
spring-framework
4556895e6e97931c642e30c8c874b690708f2ea1.json
Expose registrar for @Reflective This commit exposes the logic of processing `@Reflective` on beans so that it can be reused in custom arrangements. Closes gh-28975
spring-core/src/main/java/org/springframework/aot/hint/annotation/Reflective.java
@@ -39,6 +39,7 @@ * @author Sam Brannen * @since 6.0 * @see SimpleReflectiveProcessor + * @see ReflectiveRuntimeHintsRegistrar */ @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD })
true
Other
spring-projects
spring-framework
4556895e6e97931c642e30c8c874b690708f2ea1.json
Expose registrar for @Reflective This commit exposes the logic of processing `@Reflective` on beans so that it can be reused in custom arrangements. Closes gh-28975
spring-core/src/main/java/org/springframework/aot/hint/annotation/ReflectiveRuntimeHintsRegistrar.java
@@ -14,60 +14,65 @@ * limitations under the License. */ -package org.springframework.context.aot; +package org.springframework.aot.hint.annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.HashMap; -import java.util.LinkedHash...
true
Other
spring-projects
spring-framework
4556895e6e97931c642e30c8c874b690708f2ea1.json
Expose registrar for @Reflective This commit exposes the logic of processing `@Reflective` on beans so that it can be reused in custom arrangements. Closes gh-28975
spring-core/src/test/java/org/springframework/aot/hint/annotation/ReflectiveRuntimeHintsRegistrarTests.java
@@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.aot; +package org.springframework.aot.hint.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -24,52 +24,45 @@ import org.junit.jupiter.api.Test; -import org.springframe...
true
Other
spring-projects
spring-framework
9846d28ae625fffb0105c0e15f175935aba64fa2.json
Remove support for declaring class proxies hints Closes gh-28972
spring-core/src/main/java/org/springframework/aot/hint/ClassProxyHint.java
@@ -1,172 +0,0 @@ -/* - * Copyright 2002-2022 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 ...
true
Other
spring-projects
spring-framework
9846d28ae625fffb0105c0e15f175935aba64fa2.json
Remove support for declaring class proxies hints Closes gh-28972
spring-core/src/main/java/org/springframework/aot/hint/ProxyHints.java
@@ -21,8 +21,6 @@ import java.util.function.Consumer; import java.util.stream.Stream; -import org.springframework.aot.hint.ClassProxyHint.Builder; - /** * Gather the need for using proxies at runtime. * @@ -33,8 +31,6 @@ public class ProxyHints { private final Set<JdkProxyHint> jdkProxies = new LinkedHashS...
true
Other
spring-projects
spring-framework
9846d28ae625fffb0105c0e15f175935aba64fa2.json
Remove support for declaring class proxies hints Closes gh-28972
spring-core/src/test/java/org/springframework/aot/hint/ClassProxyHintTests.java
@@ -1,101 +0,0 @@ -/* - * Copyright 2002-2022 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 ...
true
Other
spring-projects
spring-framework
9846d28ae625fffb0105c0e15f175935aba64fa2.json
Remove support for declaring class proxies hints Closes gh-28972
spring-core/src/test/java/org/springframework/aot/hint/ProxyHintsTests.java
@@ -16,9 +16,7 @@ package org.springframework.aot.hint; -import java.io.Serializable; import java.util.Arrays; -import java.util.Properties; import java.util.function.Consumer; import java.util.function.Function; @@ -82,33 +80,6 @@ void registerJdkProxyTwiceExposesOneHint() { assertThat(this.proxyHints.jdk...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-beans/src/main/java/org/springframework/beans/factory/annotation/JakartaAnnotationsRuntimeHints.java
@@ -1,42 +0,0 @@ -/* - * Copyright 2002-2022 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 -...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-beans/src/main/resources/META-INF/spring/aot.factories
@@ -1,5 +1,2 @@ org.springframework.beans.factory.aot.BeanFactoryInitializationAotProcessor=\ org.springframework.beans.factory.aot.BeanRegistrationsAotProcessor - -org.springframework.aot.hint.RuntimeHintsRegistrar=\ -org.springframework.beans.factory.annotation.JakartaAnnotationsRuntimeHints \ No newline at end of ...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-beans/src/test/java/org/springframework/beans/factory/annotation/JakartaAnnotationsRuntimeHintsTests.java
@@ -1,62 +0,0 @@ -/* - * Copyright 2002-2022 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 -...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-context/src/main/java/org/springframework/context/aot/ReflectiveProcessorBeanRegistrationAotProcessor.java
@@ -142,9 +142,11 @@ public void applyTo(GenerationContext generationContext, BeanRegistrationCode be } private void registerAnnotationIfNecessary(RuntimeHints hints, AnnotatedElement element) { - MergedAnnotation<Reflective> reflectiveAnnotation = MergedAnnotations.from(element).get(Reflective.class); - if...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessor.java
@@ -25,14 +25,9 @@ import org.springframework.aop.framework.autoproxy.AbstractBeanFactoryAwareAdvisingPostProcessor; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; -import org.springframework.aot.hint.RuntimeHints; -import org.springframework.aot.hint.RuntimeHintsRegistrar; -import org.sp...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java
@@ -37,9 +37,6 @@ import org.springframework.aop.framework.AopInfrastructureBean; import org.springframework.aop.framework.AopProxyUtils; import org.springframework.aop.support.AopUtils; -import org.springframework.aot.hint.RuntimeHints; -import org.springframework.aot.hint.RuntimeHintsRegistrar; -import org.springf...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-context/src/test/java/org/springframework/context/aot/ReflectiveProcessorBeanRegistrationAotProcessorTests.java
@@ -25,7 +25,6 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.generate.GenerationContext; -import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.TypeReference; import org.springframework.aot.hint.annotation....
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-core/src/main/java/org/springframework/aot/hint/annotation/Reflective.java
@@ -32,6 +32,9 @@ * the annotated element. By default, a reflection hint is added on the * annotated element so that it can be discovered and invoked if necessary. * + * <p>A reflection hint is also added if necessary on the annotation that + * <em>directly</em> uses this annotation. + * * @author Stephane Nico...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-core/src/main/java/org/springframework/aot/hint/support/CoreAnnotationsRuntimeHints.java
@@ -1,41 +0,0 @@ -/* - * Copyright 2002-2022 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 -...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-core/src/main/java/org/springframework/aot/hint/support/RuntimeHintsUtils.java
@@ -16,19 +16,9 @@ package org.springframework.aot.hint.support; -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.function.Consumer; - -import org.springframework.aot.hint.MemberCategory; ...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-core/src/main/resources/META-INF/spring/aot.factories
@@ -1,3 +1,2 @@ org.springframework.aot.hint.RuntimeHintsRegistrar=\ -org.springframework.aot.hint.support.CoreAnnotationsRuntimeHints,\ org.springframework.aot.hint.support.SpringFactoriesLoaderRuntimeHints
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-core/src/test/java/org/springframework/aot/hint/support/CoreAnnotationsRuntimeHintsTests.java
@@ -1,61 +0,0 @@ -/* - * Copyright 2002-2022 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 -...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-core/src/test/java/org/springframework/aot/hint/support/RuntimeHintsUtilsTests.java
@@ -23,11 +23,11 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.hint.JdkProxyHint; -import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; -import org.springframework.aot.hint.TypeHint; import org.springframework.aot.hint.TypeReference; import ...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/MessagingAnnotationsRuntimeHints.java
@@ -35,8 +35,7 @@ public class MessagingAnnotationsRuntimeHints implements RuntimeHintsRegistrar { @Override public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) { - Stream.of(Controller.class, DestinationVariable.class, Header.class, Headers.class, - MessageExceptionHandler.class,...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/SimpAnnotationsRuntimeHints.java
@@ -16,8 +16,6 @@ package org.springframework.messaging.simp.annotation; -import java.util.stream.Stream; - import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.RuntimeHintsRegistrar; import org.springframework.aot.hint.support.RuntimeHintsUtils; @@ -33,7 +31,6 @@ public class S...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionRuntimeHints.java
@@ -37,7 +37,7 @@ class TransactionRuntimeHints implements RuntimeHintsRegistrar { @Override public void registerHints(RuntimeHints hints, ClassLoader classLoader) { - RuntimeHintsUtils.registerAnnotation(hints, Transactional.class); + RuntimeHintsUtils.registerSynthesizedAnnotation(hints, Transactional.class);...
true
Other
spring-projects
spring-framework
4f0c8797781a1c74ce2885e17e7d7a07bdcab619.json
Rationalize hints required for annotations This commit updates RuntimeHintsUtils to focus on registering a JDK proxy only as annotations of annotated elements that have at least an introspection hints are visible out-of-the-box. This commit also removes unnecessary hints and adapt `@Reflective` to detect if a hint is...
spring-web/src/main/java/org/springframework/web/bind/annotation/WebAnnotationsRuntimeHintsRegistrar.java
@@ -36,15 +36,12 @@ public final class WebAnnotationsRuntimeHintsRegistrar implements RuntimeHintsRe @Override public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) { Stream.of(Controller.class, ControllerAdvice.class, CookieValue.class, - CrossOrigin.class, DeleteMapping.class, Exc...
true
Other
spring-projects
spring-framework
0229cc45a03191880cd74b871bb419da836ae87a.json
Add support for Async invocation in a native image This commit adds necessary hints so that Async-annotated method can be discovered in a native image. Closes gh-28710
spring-context/src/main/java/org/springframework/scheduling/annotation/Async.java
@@ -22,6 +22,8 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.aot.hint.annotation.Reflective; + /** * Annotation that marks a method as a candidate for <i>asynchronous</i> execution. * @@ -54,6 +56,7 @@ @Target({ElementType.TYPE, ElementType.MET...
true
Other
spring-projects
spring-framework
0229cc45a03191880cd74b871bb419da836ae87a.json
Add support for Async invocation in a native image This commit adds necessary hints so that Async-annotated method can be discovered in a native image. Closes gh-28710
spring-context/src/main/java/org/springframework/scheduling/annotation/SchedulingRuntimeHints.java
@@ -0,0 +1,37 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
0229cc45a03191880cd74b871bb419da836ae87a.json
Add support for Async invocation in a native image This commit adds necessary hints so that Async-annotated method can be discovered in a native image. Closes gh-28710
spring-context/src/main/resources/META-INF/spring/aot.factories
@@ -1,2 +1,5 @@ +org.springframework.aot.hint.RuntimeHintsRegistrar= \ +org.springframework.scheduling.annotation.SchedulingRuntimeHints + org.springframework.beans.factory.aot.BeanRegistrationAotProcessor= \ -org.springframework.context.aot.ReflectiveProcessorBeanRegistrationAotProcessor \ No newline at end of file +...
true
Other
spring-projects
spring-framework
3086d90e7dc3bcff0cdd2e1c4c7eef401b0adc1e.json
Add the necessary hints for use of Cglib proxies This commit expands GeneratedClassHandler to allow invocation of declared fields and methods. Generated proxies have a number of internal fields and methods that are invoked via reflection. See gh-28954
spring-context/src/main/java/org/springframework/context/aot/GeneratedClassHandler.java
@@ -39,7 +39,9 @@ class GeneratedClassHandler implements BiConsumer<String, byte[]> { private static final Consumer<Builder> asCglibProxy = hint -> - hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS); + hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, + MemberCategory.INVOKE_DECLAR...
true
Other
spring-projects
spring-framework
3086d90e7dc3bcff0cdd2e1c4c7eef401b0adc1e.json
Add the necessary hints for use of Cglib proxies This commit expands GeneratedClassHandler to allow invocation of declared fields and methods. Generated proxies have a number of internal fields and methods that are invoked via reflection. See gh-28954
spring-context/src/test/java/org/springframework/context/aot/GeneratedClassHandlerTests.java
@@ -54,7 +54,8 @@ void handlerGenerateRuntimeHints() { String className = "com.example.Test$$Proxy$$1"; this.handler.accept(className, TEST_CONTENT); assertThat(RuntimeHintsPredicates.reflection().onType(TypeReference.of(className)) - .withMemberCategory(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)) + .w...
true
Other
spring-projects
spring-framework
05c997802bc06c220f2a6a2fcc43f940af3bee6d.json
Upgrade CI image to Ubuntu Jammy
ci/images/README.adoc
@@ -11,7 +11,7 @@ $ docker build --no-cache -f <image-folder>/Dockerfile . For example ---- -$ docker build --no-cache -f spring-framework-ci-image/Dockerfile . +$ docker build --no-cache -f ci-image/Dockerfile . ---- To test run:
true
Other
spring-projects
spring-framework
05c997802bc06c220f2a6a2fcc43f940af3bee6d.json
Upgrade CI image to Ubuntu Jammy
ci/images/ci-image/Dockerfile
@@ -1,4 +1,4 @@ -FROM ubuntu:focal-20220922 +FROM ubuntu:jammy-20221020 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh
true
Other
spring-projects
spring-framework
38e84a76f9e7e4742322cb87beb15024916cd43c.json
Upgrade JDK versions in CI image
ci/images/get-jdk-url.sh
@@ -3,13 +3,13 @@ set -e case "$1" in java17) - echo "https://github.com/bell-sw/Liberica/releases/download/17.0.4.1+1/bellsoft-jdk17.0.4.1+1-linux-amd64.tar.gz" + echo "https://github.com/bell-sw/Liberica/releases/download/17.0.5+8/bellsoft-jdk17.0.5+8-linux-amd64.tar.gz" ;; java18) - echo "https://github....
false
Other
spring-projects
spring-framework
52453279622a1b2b27c33cfb8d082516be601bbe.json
Fix tests and checkstyle violations See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
@@ -618,17 +618,17 @@ private class IframeHandler implements SockJsRequestHandler { <!DOCTYPE html> <html> <head> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <script> - document.dom...
true
Other
spring-projects
spring-framework
52453279622a1b2b27c33cfb8d082516be601bbe.json
Fix tests and checkstyle violations See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/HtmlFileTransportHandler.java
@@ -61,18 +61,18 @@ public class HtmlFileTransportHandler extends AbstractHttpSendingTransportHandle static { StringBuilder sb = new StringBuilder( """ - <!doctype html> + <!DOCTYPE html> <html><head> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta http-equiv="...
true
Other
spring-projects
spring-framework
52453279622a1b2b27c33cfb8d082516be601bbe.json
Fix tests and checkstyle violations See gh-29408
spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/SockJsServiceTests.java
@@ -238,14 +238,14 @@ public void handleIframeRequest() throws IOException { assertThat(this.servletResponse.getContentType()).isEqualTo("text/html;charset=UTF-8"); assertThat(this.servletResponse.getContentAsString().startsWith("<!DOCTYPE html>\n")).isTrue(); - assertThat(this.servletResponse.getContentLength...
true
Other
spring-projects
spring-framework
52453279622a1b2b27c33cfb8d082516be601bbe.json
Fix tests and checkstyle violations See gh-29408
spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpReceivingTransportHandlerTests.java
@@ -16,6 +16,8 @@ package org.springframework.web.socket.sockjs.transport.handler; +import java.nio.charset.StandardCharsets; + import org.junit.jupiter.api.Test; import org.springframework.web.socket.AbstractHttpRequestTests; @@ -26,8 +28,6 @@ import org.springframework.web.socket.sockjs.transport.session.St...
true
Other
spring-projects
spring-framework
20d0becbc62bee7e9459be1186012abd3781d4f5.json
Fix Javadoc links See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/client/standard/AnnotatedEndpointConnectionManager.java
@@ -33,7 +33,7 @@ /** * WebSocket {@link ConnectionManagerSupport connection manager} that connects * to the server via {@link WebSocketContainer} and handles the session with an - * {@link javax.websocket.ClientEndpoint @ClientEndpoint} endpoint. + * {@link jakarta.websocket.ClientEndpoint @ClientEndpoint} endpoi...
true
Other
spring-projects
spring-framework
20d0becbc62bee7e9459be1186012abd3781d4f5.json
Fix Javadoc links See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/SockJsServiceRegistration.java
@@ -102,7 +102,7 @@ public SockJsServiceRegistration setTaskScheduler(TaskScheduler scheduler) { * server. Since the iframe needs to load the SockJS javascript client library, * this property allows specifying where to load it from. * <p>By default this is set to point to - * "https://cdn.jsdelivr.net/sockjs/...
true
Other
spring-projects
spring-framework
20d0becbc62bee7e9459be1186012abd3781d4f5.json
Fix Javadoc links See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java
@@ -46,7 +46,7 @@ public String encode(String... messages) { } /** - * Apply standard JSON string quoting (see https://www.json.org/). + * Apply standard JSON string quoting (see <a href="https://www.json.org/">json.org</a>). */ protected abstract char[] applyJsonQuoting(String content);
true
Other
spring-projects
spring-framework
20d0becbc62bee7e9459be1186012abd3781d4f5.json
Fix Javadoc links See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
@@ -149,7 +149,7 @@ public String getName() { * server. Since the iframe needs to load the SockJS javascript client library, * this property allows specifying where to load it from. * <p>By default this is set to point to - * "https://cdn.jsdelivr.net/sockjs/1.0.0/sockjs.min.js". + * "<a href="https://cdn.js...
true
Other
spring-projects
spring-framework
eec3c6f7bb8a7b1da160bdb1585e2e1c4181352d.json
Replace concatenated strings with text blocks See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java
@@ -614,22 +614,23 @@ else if (request.getMethod() == HttpMethod.OPTIONS) { private class IframeHandler implements SockJsRequestHandler { private static final String IFRAME_CONTENT = - "<!DOCTYPE html>\n" + - "<html>\n" + - "<head>\n" + - " <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />...
true
Other
spring-projects
spring-framework
eec3c6f7bb8a7b1da160bdb1585e2e1c4181352d.json
Replace concatenated strings with text blocks See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/HtmlFileTransportHandler.java
@@ -60,18 +60,19 @@ public class HtmlFileTransportHandler extends AbstractHttpSendingTransportHandle static { StringBuilder sb = new StringBuilder( - "<!doctype html>\n" + - "<html><head>\n" + - " <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n" + - " <meta http-equiv=\"Content-Type\"...
true
Other
spring-projects
spring-framework
eec3c6f7bb8a7b1da160bdb1585e2e1c4181352d.json
Replace concatenated strings with text blocks See gh-29408
spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java
@@ -109,7 +109,11 @@ public void handleMessageToClientWithConnectedFrame() { assertThat(this.session.getSentMessages().size()).isEqualTo(1); WebSocketMessage<?> textMessage = this.session.getSentMessages().get(0); - assertThat(textMessage.getPayload()).isEqualTo(("CONNECTED\n" + "user-name:joe\n" + "\n" + "\u0...
true
Other
spring-projects
spring-framework
eec3c6f7bb8a7b1da160bdb1585e2e1c4181352d.json
Replace concatenated strings with text blocks See gh-29408
spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java
@@ -75,7 +75,10 @@ public class RestTemplateXhrTransportTests { @Test public void connectReceiveAndClose() throws Exception { - String body = "o\n" + "a[\"foo\"]\n" + "c[3000,\"Go away!\"]"; + String body = """ + o + a["foo"] + c[3000,"Go away!"]"""; ClientHttpResponse response = response(HttpStatus...
true
Other
spring-projects
spring-framework
19955c5b77ce4cf494fbf751fbf009a862490c47.json
Remove unnecessary calls to toString() See gh-29408
spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionDisconnectEvent.java
@@ -89,7 +89,7 @@ public CloseStatus getCloseStatus() { @Override public String toString() { - return "SessionDisconnectEvent[sessionId=" + this.sessionId + ", " + this.status.toString() + "]"; + return "SessionDisconnectEvent[sessionId=" + this.sessionId + ", " + this.status + "]"; } }
true
Other
spring-projects
spring-framework
19955c5b77ce4cf494fbf751fbf009a862490c47.json
Remove unnecessary calls to toString() See gh-29408
spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupportTests.java
@@ -244,15 +244,15 @@ public boolean equals(Object obj) { private static class MyTypeToStringConverter implements Converter<MyType, String> { @Override public String convert(MyType source) { - return "_" + source.toString(); + return "_" + source; } } private static class MyTypeToBytesConverter i...
true
Other
spring-projects
spring-framework
19955c5b77ce4cf494fbf751fbf009a862490c47.json
Remove unnecessary calls to toString() See gh-29408
spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java
@@ -91,7 +91,7 @@ public void connectReceiveAndCloseWithPrelude() throws Exception { for (int i = 0; i < 2048; i++) { sb.append('h'); } - String body = sb.toString() + "\n" + "o\n" + "a[\"foo\"]\n" + "c[3000,\"Go away!\"]"; + String body = sb + "\n" + "o\n" + "a[\"foo\"]\n" + "c[3000,\"Go away!\"]"; Clie...
true
Other
spring-projects
spring-framework
676f163546d521082e5c527cb19db7e4ac470fcf.json
Fix Artifactory configuration for docs deployment This commit aligns the Artifactory configuration with the changes applied in gh-29417. In order to be deployed, docs artifacts must have specific properties attached to them. See gh-29417
ci/pipeline.yml
@@ -218,21 +218,21 @@ jobs: threads: 8 artifact_set: - include: - - "/**/spring-*.zip" + - "/**/framework-docs-*.zip" properties: "zip.name": "spring-framework" "zip.displayname": "Spring Framework" "zip.deployed": "false" - include: - ...
false
Other
spring-projects
spring-framework
403cfefc28c1c4999023f0fa4d2daefbbaca275f.json
Add AOT processing of bean aliases This commit adds AOT processing of bean aliases. Closes gh-29391
spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationsAotContribution.java
@@ -30,12 +30,14 @@ import org.springframework.javapoet.ClassName; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; +import org.springframework.util.MultiValueMap; /** * AOT contribution from a {@link BeanRegistrationsAotProcessor} used to - * register bean definiti...
true
Other
spring-projects
spring-framework
403cfefc28c1c4999023f0fa4d2daefbbaca275f.json
Add AOT processing of bean aliases This commit adds AOT processing of bean aliases. Closes gh-29391
spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationsAotProcessor.java
@@ -21,12 +21,15 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.RegisteredBean; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; /** * {@link BeanFactoryInitializationAotPr...
true
Other
spring-projects
spring-framework
403cfefc28c1c4999023f0fa4d2daefbbaca275f.json
Add AOT processing of bean aliases This commit adds AOT processing of bean aliases. Closes gh-29391
spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotContributionTests.java
@@ -42,16 +42,20 @@ import org.springframework.core.test.tools.Compiled; import org.springframework.core.test.tools.SourceFile; import org.springframework.core.test.tools.TestCompiler; +import org.springframework.javapoet.ClassName; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet...
true
Other
spring-projects
spring-framework
403cfefc28c1c4999023f0fa4d2daefbbaca275f.json
Add AOT processing of bean aliases This commit adds AOT processing of bean aliases. Closes gh-29391
spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotProcessorTests.java
@@ -30,6 +30,7 @@ * Tests for {@link BeanRegistrationsAotProcessor}. * * @author Phillip Webb + * @author Sebastien Deleuze */ class BeanRegistrationsAotProcessorTests { @@ -53,4 +54,17 @@ void processAheadOfTimeReturnsBeanRegistrationsAotContributionWithRegistrations( .asInstanceOf(InstanceOfAssertFact...
true
Other
spring-projects
spring-framework
bfe37c290e033aa1684faf61941bbbceb1d3324d.json
Refine PreComputeFieldFeature logging Closes gh-29406
spring-core/src/main/java/org/springframework/aot/nativex/feature/PreComputeFieldFeature.java
@@ -64,7 +64,7 @@ private void iterateFields(DuringAnalysisAccess access, Class<?> subtype) { System.out.println("Field " + fieldIdentifier + " set to " + fieldValue + " at build time"); } catch (Throwable ex) { - System.out.println("Processing of field " + fieldIdentifier + " skipped due th...
false
Other
spring-projects
spring-framework
6e9fbcc24317d31cc3aab81239dd06f52793af88.json
Improve PartEvent documentation Add note about the necessity of consuming the PartEvent content. See gh-29400
src/docs/asciidoc/web/webflux-functional.adoc
@@ -259,6 +259,8 @@ allPartsEvents.windowUntil(PartEvent::isLast) } ---- +Note that the body contents of the `PartEvent` objects must be completely consumed, relayed, or released to avoid memory leaks. + [[webflux-fn-response]] === ServerResponse
true
Other
spring-projects
spring-framework
6e9fbcc24317d31cc3aab81239dd06f52793af88.json
Improve PartEvent documentation Add note about the necessity of consuming the PartEvent content. See gh-29400
src/docs/asciidoc/web/webflux.adoc
@@ -2855,7 +2855,7 @@ For example: } else if (event instanceof FilePartEvent fileEvent) { <5> String filename = fileEvent.filename(); - Flux<DataBuffer> contents = partEvents.map(PartEvent::content); + ...
true
Other
spring-projects
spring-framework
39f24f024458c21ed4ba97976cc2ed59a5ec4ba3.json
Introduce DataFieldMaxValueIncrementer for MariaDB Closes gh-29379
spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/MariaDBSequenceMaxValueIncrementer.java
@@ -0,0 +1,52 @@ +/* + * Copyright 2022 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 + * + ...
true
Other
spring-projects
spring-framework
39f24f024458c21ed4ba97976cc2ed59a5ec4ba3.json
Introduce DataFieldMaxValueIncrementer for MariaDB Closes gh-29379
spring-jdbc/src/test/java/org/springframework/jdbc/support/DataFieldMaxValueIncrementerTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 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,7 @@ import org.springframework.j...
true
Other
spring-projects
spring-framework
5aeafc07616b9adcf0f37f6dd81f18ecf5faba6c.json
Fix ISE in [Http|RSocket]ServiceProxyFactory Closes gh-29376
spring-messaging/src/main/java/org/springframework/messaging/rsocket/service/RSocketServiceProxyFactory.java
@@ -115,8 +115,9 @@ public void setCustomArgumentResolvers(List<RSocketServiceArgumentResolver> reso @Deprecated(since = "6.0.0-RC2", forRemoval = true) @Override public void setEmbeddedValueResolver(StringValueResolver resolver) { - Assert.state(this.beanStyleFactory != null, "RSocketServiceProxyFactory was cre...
true
Other
spring-projects
spring-framework
5aeafc07616b9adcf0f37f6dd81f18ecf5faba6c.json
Fix ISE in [Http|RSocket]ServiceProxyFactory Closes gh-29376
spring-web/src/main/java/org/springframework/web/service/invoker/HttpServiceProxyFactory.java
@@ -131,8 +131,9 @@ public void setConversionService(ConversionService conversionService) { @Deprecated(since = "6.0.0-RC2", forRemoval = true) @Override public void setEmbeddedValueResolver(StringValueResolver resolver) { - Assert.state(this.beanStyleFactory != null, "HttpServiceProxyFactory was created through...
true
Other
spring-projects
spring-framework
386d83545d942ab92270b7d4f8626b365b874996.json
Register proxy hints for HttpExchange annotations Close gh-29271
spring-web/spring-web.gradle
@@ -57,6 +57,7 @@ dependencies { optional("org.jetbrains.kotlinx:kotlinx-serialization-cbor") optional("org.jetbrains.kotlinx:kotlinx-serialization-json") optional("org.jetbrains.kotlinx:kotlinx-serialization-protobuf") + testImplementation(project(":spring-core-test")) testImplementation(testFixtures(project("...
true
Other
spring-projects
spring-framework
386d83545d942ab92270b7d4f8626b365b874996.json
Register proxy hints for HttpExchange annotations Close gh-29271
spring-web/src/main/java/org/springframework/web/service/annotation/HttpExchangeBeanRegistrationAotProcessor.java
@@ -0,0 +1,78 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
386d83545d942ab92270b7d4f8626b365b874996.json
Register proxy hints for HttpExchange annotations Close gh-29271
spring-web/src/main/resources/META-INF/spring/aot.factories
@@ -2,4 +2,7 @@ org.springframework.aot.hint.RuntimeHintsRegistrar= \ org.springframework.http.HttpMimeTypesRuntimeHints,\ org.springframework.http.codec.CodecConfigurerRuntimeHints,\ org.springframework.http.converter.json.JacksonModulesRuntimeHints,\ -org.springframework.web.util.WebUtilRuntimeHints \ No newline a...
true
Other
spring-projects
spring-framework
386d83545d942ab92270b7d4f8626b365b874996.json
Register proxy hints for HttpExchange annotations Close gh-29271
spring-web/src/test/java/org/springframework/web/service/annotation/HttpExchangeBeanRegistrationAotProcessorTests.java
@@ -0,0 +1,86 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
3d89acf9ea0bce8c41d2084b55e7eca15d481be4.json
Adjust checkForLeaks timeout settings LeakAwareDataBufferFactory#checkForLeaks automatically waits up to 5 sec for buffers to be released, which could be used as a way of awaiting on some async logic to complete, and as long as buffers are released, it shouldn't be long. However, the leak test in LeakAwareDataBufferFa...
spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java
@@ -63,7 +63,7 @@ void canEncode() { } @Test - void shouldEncodeResourceRegionFileResource() throws Exception { + void shouldEncodeResourceRegionFileResource() { ResourceRegion region = new ResourceRegion( new ClassPathResource("ResourceRegionEncoderTests.txt", getClass()), 0, 6); Flux<DataBuffer> resu...
true
Other
spring-projects
spring-framework
3d89acf9ea0bce8c41d2084b55e7eca15d481be4.json
Adjust checkForLeaks timeout settings LeakAwareDataBufferFactory#checkForLeaks automatically waits up to 5 sec for buffers to be released, which could be used as a way of awaiting on some async logic to complete, and as long as buffers are released, it shouldn't be long. However, the leak test in LeakAwareDataBufferFa...
spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java
@@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,8 +35,7 @@ class LeakAwareDataBufferFact...
true
Other
spring-projects
spring-framework
3d89acf9ea0bce8c41d2084b55e7eca15d481be4.json
Adjust checkForLeaks timeout settings LeakAwareDataBufferFactory#checkForLeaks automatically waits up to 5 sec for buffers to be released, which could be used as a way of awaiting on some async logic to complete, and as long as buffers are released, it shouldn't be long. However, the leak test in LeakAwareDataBufferFa...
spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractLeakCheckingTests.java
@@ -16,6 +16,8 @@ package org.springframework.core.testfixture.io.buffer; +import java.time.Duration; + import org.junit.jupiter.api.AfterEach; import org.springframework.core.io.buffer.DataBufferFactory; @@ -42,7 +44,7 @@ public abstract class AbstractLeakCheckingTests { */ @AfterEach final void checkF...
true
Other
spring-projects
spring-framework
3d89acf9ea0bce8c41d2084b55e7eca15d481be4.json
Adjust checkForLeaks timeout settings LeakAwareDataBufferFactory#checkForLeaks automatically waits up to 5 sec for buffers to be released, which could be used as a way of awaiting on some async logic to complete, and as long as buffers are released, it shouldn't be long. However, the leak test in LeakAwareDataBufferFa...
spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBufferFactory.java
@@ -81,13 +81,21 @@ public LeakAwareDataBufferFactory(DataBufferFactory delegate) { * method. */ public void checkForLeaks() { + checkForLeaks(Duration.ofSeconds(0)); + } + + /** + * Variant of {@link #checkForLeaks()} with the option to wait for buffer release. + * @param timeout how long to wait for buffer...
true
Other
spring-projects
spring-framework
d6d4b98780132fff58ba610d2cde53419d32ce4a.json
Add ifPresent utility methods on RuntimeHints This commit adds a utility method to register a type for reflection if it is available on the classpath. It also adds a method to register a resource pattern if a given location is available. Closes gh-28617
spring-core/src/main/java/org/springframework/aot/hint/ReflectionHints.java
@@ -30,6 +30,7 @@ import org.springframework.aot.hint.TypeHint.Builder; import org.springframework.lang.Nullable; +import org.springframework.util.ClassUtils; /** * Gather the need for reflection at runtime. @@ -95,6 +96,22 @@ public ReflectionHints registerType(Class<?> type, Consumer<TypeHint.Builder> ty ...
true
Other
spring-projects
spring-framework
d6d4b98780132fff58ba610d2cde53419d32ce4a.json
Add ifPresent utility methods on RuntimeHints This commit adds a utility method to register a type for reflection if it is available on the classpath. It also adds a method to register a resource pattern if a given location is available. Closes gh-28617
spring-core/src/main/java/org/springframework/aot/hint/ResourceHints.java
@@ -65,6 +65,24 @@ public Stream<ResourceBundleHint> resourceBundles() { return this.resourceBundleHints.stream(); } + /** + * Register a pattern if the given {@code location} is available on the + * classpath. This delegates to {@link ClassLoader#getResource(String)} + * which validates directories as well. ...
true
Other
spring-projects
spring-framework
d6d4b98780132fff58ba610d2cde53419d32ce4a.json
Add ifPresent utility methods on RuntimeHints This commit adds a utility method to register a type for reflection if it is available on the classpath. It also adds a method to register a resource pattern if a given location is available. Closes gh-28617
spring-core/src/test/java/org/springframework/aot/hint/ReflectionHintsTests.java
@@ -27,6 +27,8 @@ import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link ReflectionHints}. @@ -45,6 +47,23 @@ void registerType() { t...
true
Other
spring-projects
spring-framework
d6d4b98780132fff58ba610d2cde53419d32ce4a.json
Add ifPresent utility methods on RuntimeHints This commit adds a utility method to register a type for reflection if it is available on the classpath. It also adds a method to register a resource pattern if a given location is available. Closes gh-28617
spring-core/src/test/java/org/springframework/aot/hint/ResourceHintsTests.java
@@ -26,6 +26,8 @@ import org.springframework.aot.hint.ResourceHintsTests.Nested.Inner; import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link ResourceHints}. @@ -91,6 +93,23 @@ void regis...
true
Other
spring-projects
spring-framework
0992f855e64216970cb2c3f92cf6e6eab0ad62e4.json
Add base infra for Web controllers hints See gh-28518
spring-web/src/main/java/org/springframework/http/MediaTypeResourceHintsRegistrar.java
@@ -0,0 +1,36 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
0992f855e64216970cb2c3f92cf6e6eab0ad62e4.json
Add base infra for Web controllers hints See gh-28518
spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java
@@ -22,6 +22,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.aot.hint.annotation.Reflective; import org.springframework.core.annotation.AliasFor; /** @@ -72,6 +73,7 @@ @Retention(RetentionPolicy.RUNTIME) @Documented @Mapping +@Reflective(Reque...
true
Other
spring-projects
spring-framework
0992f855e64216970cb2c3f92cf6e6eab0ad62e4.json
Add base infra for Web controllers hints See gh-28518
spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMappingReflectiveProcessor.java
@@ -0,0 +1,41 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
0992f855e64216970cb2c3f92cf6e6eab0ad62e4.json
Add base infra for Web controllers hints See gh-28518
spring-web/src/main/java/org/springframework/web/bind/annotation/WebAnnotationsRuntimeHintsRegistrar.java
@@ -0,0 +1,50 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
0992f855e64216970cb2c3f92cf6e6eab0ad62e4.json
Add base infra for Web controllers hints See gh-28518
spring-web/src/main/resources/META-INF/native-image/org.springframework/spring-web/native-image.properties
@@ -0,0 +1 @@ +Args = --initialize-at-build-time=org.springframework.http.HttpStatus
true
Other
spring-projects
spring-framework
0992f855e64216970cb2c3f92cf6e6eab0ad62e4.json
Add base infra for Web controllers hints See gh-28518
spring-web/src/main/resources/META-INF/spring/aot.factories
@@ -0,0 +1,2 @@ +org.springframework.aot.hint.RuntimeHintsRegistrar= \ +org.springframework.http.MediaTypeResourceHintsRegistrar \ No newline at end of file
true
Other
spring-projects
spring-framework
0992f855e64216970cb2c3f92cf6e6eab0ad62e4.json
Add base infra for Web controllers hints See gh-28518
spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java
@@ -33,6 +33,7 @@ import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ImportRuntimeHints; import org.springframework.context.annotation.Lazy; impor...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGeneratorTests.java
@@ -28,8 +28,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.generate.GeneratedMethods; -import org.springframework.aot.hint.ExecutableMode; import org.springframework.aot.hint.RuntimeHints; +import org.springframework.aot.hint.RuntimeHintsPredicates; import org.springframework.aot.test.gen...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-context/src/test/java/org/springframework/context/aot/ReflectiveProcessorBeanRegistrationAotProcessorTests.java
@@ -29,6 +29,7 @@ import org.springframework.aot.generate.InMemoryGeneratedFiles; import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; +import org.springframework.aot.hint.RuntimeHintsPredicates; import org.springframework.aot.hint.TypeReference; import org.springfr...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/main/java/org/springframework/aot/hint/ProxyHintsPredicates.java
@@ -0,0 +1,61 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/main/java/org/springframework/aot/hint/ReflectionHintsPredicates.java
@@ -0,0 +1,380 @@ +/* + * Copyright 2002-2022 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 ...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/main/java/org/springframework/aot/hint/ResourceHintsPredicates.java
@@ -0,0 +1,92 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/main/java/org/springframework/aot/hint/ResourcePatternHints.java
@@ -22,6 +22,8 @@ import java.util.List; import java.util.Set; +import org.springframework.lang.Nullable; + /** * A collection of {@link ResourcePatternHint} describing whether * resources should be made available at runtime through a matching @@ -43,6 +45,11 @@ private ResourcePatternHints(Builder builder) { ...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/main/java/org/springframework/aot/hint/RuntimeHintsPredicates.java
@@ -0,0 +1,69 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/test/java/org/springframework/aot/hint/ProxyHintsPredicatesTests.java
@@ -0,0 +1,76 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/test/java/org/springframework/aot/hint/ReflectionHintsPredicatesTests.java
@@ -0,0 +1,509 @@ +/* + * Copyright 2002-2022 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 ...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/test/java/org/springframework/aot/hint/ResourceHintsPredicatesTests.java
@@ -0,0 +1,88 @@ +/* + * Copyright 2002-2022 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 +...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/test/java/org/springframework/aot/hint/support/CoreAnnotationsRuntimeHintsRegistrarTests.java
@@ -21,8 +21,8 @@ import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; +import org.springframework.aot.hint.RuntimeHintsPredicates; import org.springframework.aot.hint.RuntimeHintsRegistrar; -import org.springframework.aot.hint.TypeReference; import org.springframe...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-core/src/test/java/org/springframework/aot/hint/support/SpringFactoriesLoaderRuntimeHintsRegistrarTests.java
@@ -20,11 +20,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.hint.MemberCategory; -import org.springframework.aot.hint.ResourcePatternHint; import org.springframework.aot.hint.RuntimeHints; +import org.springframework.aot.hint.RuntimeHintsPredicates; import org.springframework.aot.hint.Run...
true
Other
spring-projects
spring-framework
9c9b2356cec4a74c685320c5b8b1b6eb283f9dc0.json
Add RuntimeHints predicates generator The `RuntimeHints` API allows to describe hints for the reflection, proxies and resources behavior at runtime. The need for a particular behavior can be covered by several types of hints, at different levels. This knowledge can be important in several cases: * before contributing...
spring-orm/src/test/java/org/springframework/orm/jpa/support/InjectionCodeGeneratorTests.java
@@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test; -import org.springframework.aot.hint.ExecutableMode; import org.springframework.aot.hint.RuntimeHints; +import org.springframework.aot.hint.RuntimeHintsPredicates; import org.springframework.aot.test.generator.compile.Compiled; import org.springframework.aot....
true
Other
spring-projects
spring-framework
100ce9642afb14b806e42ae9277f77171a7bc04c.json
Use TypeReference consistently in hints writer Closes gh-28606
spring-core/src/main/java/org/springframework/aot/nativex/ProxyHintsWriter.java
@@ -21,7 +21,6 @@ import org.springframework.aot.hint.JdkProxyHint; import org.springframework.aot.hint.ProxyHints; -import org.springframework.aot.hint.TypeReference; /** * Write {@link JdkProxyHint}s contained in a {@link ProxyHints} to the JSON @@ -46,8 +45,7 @@ public void write(BasicJsonWriter writer, Pro...
true
Other
spring-projects
spring-framework
100ce9642afb14b806e42ae9277f77171a7bc04c.json
Use TypeReference consistently in hints writer Closes gh-28606
spring-core/src/main/java/org/springframework/aot/nativex/ReflectionHintsWriter.java
@@ -29,7 +29,6 @@ import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.ReflectionHints; import org.springframework.aot.hint.TypeHint; -import org.springframework.aot.hint.TypeReference; import org.springframework.lang.Nullable; /** @@ -96,7 +95,7 @@ private void handleExecutabl...
true
Other
spring-projects
spring-framework
100ce9642afb14b806e42ae9277f77171a7bc04c.json
Use TypeReference consistently in hints writer Closes gh-28606
spring-core/src/test/java/org/springframework/aot/nativex/ProxyHintsWriterTests.java
@@ -63,6 +63,16 @@ void shouldWriteMultipleEntries() throws JSONException { ]""", hints); } + @Test + void shouldWriteInnerClass() throws JSONException { + ProxyHints hints = new ProxyHints(); + hints.registerJdkProxy(Inner.class); + assertEquals(""" + [ + { "interfaces": [ "org.springframework.aot.n...
true