commercetools-jvm-sdk icon indicating copy to clipboard operation
commercetools-jvm-sdk copied to clipboard

AttributeDraftImpl getValue with type using AttributeAcess

Open heshamMassoud opened this issue 7 years ago • 0 comments

In the AttributeImpl there is the method getValue that takes AttributeAccess<T> access to return you a value of type T. For example, it can be used to return a value of LocalizedString by passing the AttributeAccess.ofLocalizedString(). However, in AttributeDraftImpl, getValue only returns JsonNode, so you cannot get the value with it's actual type and have to do manual parsing instead. Why does AttributeDraft not have, like AttributeImpl, a getValue method that takes AttributeAccess<T> access to return you a value of type T?

heshamMassoud avatar Nov 27 '17 15:11 heshamMassoud