Describe the bug
The DynamoDB Enhanced Client fails to recognize a valid setter when a bean has both getA() and isA() methods, even when isA() is annotated with @DynamoDbIgnore.
Regression Issue
Expected Behavior
a should be mapped using:
getA(): int
setA(int): void
and isA() should be ignored because of @DynamoDbIgnore.
Current Behavior
The setA(int) setter is not recognized, and the a attribute is not mapped correctly.
This appears to be caused by the interaction between JavaBeans property introspection and the two getters:
getA(): int
isA(): boolean
Even though isA() is annotated with @DynamoDbIgnore, it still affects property discovery.
Reproduction Steps
@DynamoDbBean
public class Foo {
private int a;
@DynamoDbAttribute("A")
public int getA() {
return a;
}
public void setA(int a) {
this.a = a;
}
@DynamoDbIgnore
public boolean isA() {
return false;
}
}
Possible Solution
No response
Additional Information/Context
The same class is mapped correctly by the AWS SDK for Java v1, which does not rely on the same JavaBeans property conventions as the v2 Enhanced Client.
AWS Java SDK version used
2.51.3
JDK version used
11.0.32.1
Operating System and version
Windows 11
Describe the bug
The DynamoDB Enhanced Client fails to recognize a valid setter when a bean has both
getA()andisA()methods, even whenisA()is annotated with@DynamoDbIgnore.Regression Issue
Expected Behavior
ashould be mapped using:and
isA()should be ignored because of@DynamoDbIgnore.Current Behavior
The
setA(int)setter is not recognized, and theaattribute is not mapped correctly.This appears to be caused by the interaction between JavaBeans property introspection and the two getters:
Even though
isA()is annotated with@DynamoDbIgnore, it still affects property discovery.Reproduction Steps
Possible Solution
No response
Additional Information/Context
The same class is mapped correctly by the AWS SDK for Java v1, which does not rely on the same JavaBeans property conventions as the v2 Enhanced Client.
AWS Java SDK version used
2.51.3
JDK version used
11.0.32.1
Operating System and version
Windows 11