Skip to content

Refine filters for TypeCollector and ManagedTypesBeanRegistrationAotProcessor contributions #3362

@mp911de

Description

@mp911de

TypeCollector.inspect(types) can quickly dive into types that reside within library code that we don't want to introspect. It would be good to apply a predicate where to stop so that we can stop at some point and don't include certain types in the analysis.

This otherwise leads to long recursive stack traces

       at org.springframework.data.aot.ManagedTypesBeanRegistrationAotProcessor.contributeType(ManagedTypesBeanRegistrationAotProcessor.java:145)
        at org.springframework.data.aot.ManagedTypesRegistrationAotContribution.lambda$applyTo$0(ManagedTypesRegistrationAotContribution.java:98)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:115)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.processType(TypeCollector.java:129)
        at org.springframework.data.util.TypeCollector.process(TypeCollector.java:102)
        at org.springframework.data.util.TypeCollector$ReachableTypes.lambda$forEach$0(TypeCollector.java:241)

for types that we know we don't want to introspect. A control from a module would be good using some sort of Predicate.

Sub-issues

Metadata

Metadata

Assignees

Labels

theme: aotAn issue related to Ahead-Of-Time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions