Skip to content

Lazy fails to compile #895

@re-thc

Description

@re-thc

Hi, it's great to hear there's compile time lazy but this breaks for some classes. Below is an example with SecureRandom. Same happens to e.g. jooq and some other libraries. It works fine with 11.5 but breaks with 11.6 and above.

/t0/app/build/generated/sources/annotationProcessor/java/main/org/example/SecureRandom$Lazy.java:16: error: type Provider does not take parameters private final Provider<SecureRandom> onceProvider;

The code is just

@Lazy
@Factory
public class RandomFactory {
    @Bean
    public SecureRandom secureRandom() {
        return new SecureRandom();
    }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions