Skip to content

software.amazon.awssdk.services.dynamodb.model.AttributeValue implements Serializable, but errors on serialization #5924

@ryucc

Description

@ryucc

Describe the bug

java.io.NotSerializableException: software.amazon.awssdk.core.util.DefaultSdkAutoConstructList

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

There should be no errors when serializing software.amazon.awssdk.services.dynamodb.model.AttributeValue

Current Behavior

Exception is thrown.
java.io.NotSerializableException: software.amazon.awssdk.core.util.DefaultSdkAutoConstructList

Reproduction Steps

'''
public String serialize(Serializable object) throws SerializationException {
try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(
baos)) {
objectOutputStream.writeObject(object);
objectOutputStream.flush();
return encoder.encodeToString(baos.toByteArray());
} catch (IOException e) {
throw new SerializationException(e);
}
}
void test(AttributeValue av) {
serialize(av);
}
'''

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.30.31

JDK version used

1.8

Operating System and version

Mac OS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions