Open dimarzio opened 4 years ago
Hi @dimarzio thank you for bringing this to our attention. I transferred it to Java SDK v2 repo because it's very unlikely this change will be made in v1.
This is not high in our priority list right now, considering the requested features in the v2 backlog. If anybody is affected by this and want us to support it, please +1 the original issue to help us with prioritization.
You can use the StaticTableSchema
as a workaround for this until we can make the BeanTableSchema
compatible with groovy (or provide a groovy-equivalent).
Unfortunately the dynamodb-sdk version 1. and also version 2. is no longer compatible with Groovy 3.*
Describe the Feature
It would be great if the dynamodb SDK was compatible with Groovy 3.
Is your Feature Request related to a problem?
Yes. Detailed description see here: https://issues.apache.org/jira/browse/GROOVY-9636. Generally speaking it is no longer possible to model DynamoDB beans using Groovy 3.*. Because every object created in groovy environment is a subclass of GroovyObject it inherit all methods from it's parent. These are for example getMetaClass/setMetaClass properties. These methods will be recognized as a dynamodb bean property and the exception will be thrown.
Proposed Solution
The GroovyObject "internal" methods are annotated with Internal annotation. So this additional check would solve the problem. The responsibility is in the JDK 1. the StandardBeanProperties.BeanMap#canMap class and in the SDK 2. BeanTableSchema#isMappableProperty class
Describe alternatives you've considered
A possible workaround is to stick with the Groovy 2.* version(s).
Additional Context
No additional context. Maybe the only question: Does it make sense to introduce a hard dependency on a particular JVM language.
Your Environment