Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 2fbe662

Browse files
committed
Add type hints for Reactor's Traces class
Closes gh-1098
1 parent 2d007cb commit 2fbe662

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

spring-native-configuration/src/main/java/org/springframework/boot/test/SpringBootTestHints.java

-7
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,6 @@ public List<HintDeclaration> computeHints(TypeSystem typeSystem) {
195195
hintDeclaration.addDependantType("org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTypeExcludeFilter", new AccessDescriptor(AccessBits.LOAD_AND_CONSTRUCT));
196196
hints.add(hintDeclaration);
197197
}
198-
if (typeSystem.resolve("reactor/core/publisher/Traces", true) != null) {
199-
HintDeclaration hintDeclaration = new HintDeclaration();
200-
hintDeclaration.addDependantType("reactor.core.publisher.Traces$StackWalkerCallSiteSupplierFactory", new AccessDescriptor(AccessBits.LOAD_AND_CONSTRUCT));
201-
hintDeclaration.addDependantType("reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory", new AccessDescriptor(AccessBits.LOAD_AND_CONSTRUCT));
202-
hintDeclaration.addDependantType("reactor.core.publisher.Traces$ExceptionCallSiteSupplierFactory", new AccessDescriptor(AccessBits.LOAD_AND_CONSTRUCT));
203-
hints.add(hintDeclaration);
204-
}
205198
}
206199
List<HintDeclaration> testHints = TypeProcessor.namedProcessor("Tests")
207200
.skipTypesMatching(type -> type.getMethodsWithAnnotationName("org.junit.jupiter.api.Test", false).isEmpty())
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package reactor.core.publisher;
2+
3+
import org.springframework.nativex.hint.NativeHint;
4+
import org.springframework.nativex.hint.TypeHint;
5+
import org.springframework.nativex.type.NativeConfiguration;
6+
7+
@NativeHint(trigger = Traces.class, types = {
8+
@TypeHint(types = {
9+
Traces.StackWalkerCallSiteSupplierFactory.class,
10+
Traces.SharedSecretsCallSiteSupplierFactory.class,
11+
Traces.ExceptionCallSiteSupplierFactory.class
12+
})
13+
})
14+
public class ReactorCoreHints implements NativeConfiguration {
15+
}

spring-native-configuration/src/main/resources/META-INF/services/org.springframework.nativex.type.NativeConfiguration

+1
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,4 @@ org.springframework.transaction.annotation.TransactionManagementHints
124124
org.springframework.web.bind.annotation.WebAnnotationHints
125125
org.springframework.web.socket.WebSocketHints
126126
org.thymeleaf.ThymeleafHints
127+
reactor.core.publisher.ReactorCoreHints

0 commit comments

Comments
 (0)