Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Imports removes used imports. #3891

Open
dailytabs opened this issue Dec 11, 2024 · 0 comments
Open

Optimize Imports removes used imports. #3891

dailytabs opened this issue Dec 11, 2024 · 0 comments

Comments

@dailytabs
Copy link

dailytabs commented Dec 11, 2024

import lombok.Data;
import lombok.Getter;
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbAttribute;
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbPartitionKey;

@Data
@DynamoDbBean
public class MyClass {
    @Getter(onMethod_ = {@DynamoDbPartitionKey, @DynamoDbAttribute("request_id")})
    private String id;
    ...
}

Both of the onMethod imports are removed when optimizing, resulting in errors.

Edit: Workaround is to use the full name, instead of an import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant