#633 widened DataPart.data from Map<String, Object> to Object and
dropped the data = Map.copyOf(data) defensive copy, so callers can mutate
the contents after construction. The record still copies metadata via
CollectionCopies two lines above.
Widening the type is correct — the spec allows any JSON value — but the
copy should be applied when the value is a Map or List. Also updates
the Javadoc, which currently says data "supports ... null" while the
constructor calls checkNotNullParam and the sibling constructor says
"not null".
#633 widened
DataPart.datafromMap<String, Object>toObjectanddropped the
data = Map.copyOf(data)defensive copy, so callers can mutatethe contents after construction. The record still copies
metadataviaCollectionCopiestwo lines above.Widening the type is correct — the spec allows any JSON value — but the
copy should be applied when the value is a
MaporList. Also updatesthe Javadoc, which currently says
data"supports ... null" while theconstructor calls
checkNotNullParamand the sibling constructor says"not null".