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
James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article