Using @AllArgsConstructor(onConstructor = @__({@Inject})) making a part of code unreachable

When using Lombok's::@AllArgsConstructor(onConstructor = @__({@javax.inject.Inject})) instead of guice's::@Inject a part of code is getting unreachable. Test cases are failing due to null pointer(code unreachable). The bean that is getting injected in the constructor is:

@Provides
@Singleton
@Inject
EntryDao getEntryDao( @Named("dynamoDBEncryptionLoggingMapper") DynamoDBLoggingMapper dynamoDBMapper){ return new EntryDao(dynamoDBMapper);
}

Does anyone know why it happens?

3 Related questions 0 Spring unresolvable circular reference 13 Javadoc error on @RequiredArgsConstructor(onConstructor=@__(@Inject)) 115 Is it possible to add qualifiers in @RequiredArgsConstructor(onConstructor = @__(@Autowired))? Related questions 0 Spring unresolvable circular reference 13 Javadoc error on @RequiredArgsConstructor(onConstructor=@__(@Inject)) 115 Is it possible to add qualifiers in @RequiredArgsConstructor(onConstructor = @__(@Autowired))? 1 Using AllArgsConstructor with Spring annotation argument 0 Can't access constructor with @AllArgsConstructor but works with @RequiredArgsConstructor 16 What is the difference between @RequiredArgsConstructor(onConstructor = @__(@Inject)) and @RequiredArgsConstructor? 3 @AllArgsConstructor and Constructor Injection with Spring: is private final needed? 3 @AllArgsConstructor not working with spring bean 30 Why to use @AllArgsConstructor and @NoArgsConstructor together over an Entity? 0 Getting null value for @Value with @AllArgsConstructor Load 7 more related questions Show fewer related questions Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like