You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: The produced type from a factory which has AOP proxy advice specified must define an accessible no arguments constructor. Proxying types with constructor arguments can lead to unexpected behaviour. See the javadoc for for Around.ProxyTargetConstructorMode for more information and possible solutions: classCallingInConstructor
public @NotNull TwoConstructorClass classCallingInConstructor() {
but (only) when switching the constructors (so that the parameterless one is first) the error goes away
public class TwoConstructorClass {
public TwoConstructorClass() {
this("10");
}
public TwoConstructorClass(String age) {
}
}
Expected Behavior
When compiling a factory that creates a bean with 2 constructors, it wrongly fails
Given the factory (not
@NotNull
is important for interceptor creation, which is another bug #10836)And
TwoConstructorClass
being:I would expect compilation to work
Actual Behaviour
Compilation fails with
but (only) when switching the constructors (so that the parameterless one is first) the error goes away
Steps To Reproduce
git clone https://github.com/nbrugger-tgm/micronaut-reproductions
cd micronaut-reproductions/micronaut-4-factory-regression-2
gradle classes
Environment Information
Example Application
https://github.com/nbrugger-tgm/micronaut-reproductions
Version
4.4.2
The text was updated successfully, but these errors were encountered: