Replacement for the deprecated DataHolder.get(DataKey<T>) method? #605
Thilo-Acrolinx
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
com.vladsch.flexmark.util.data.DataHolder.get(DataKey<T>)
method has been marked as deprecated (link to source).The Javadoc comment says "Use key.get(dataHolder) instead", but I fail to understand what that means. I don't see any overloaded "get(dataHolder)" method here, maybe I am overlooking something?
I am looking for a typesafe, not-deprecated API to get the value for a given key from a DataHolder. The getOrCompute() method is no alternative unfortunately, since it returns
java.lang.Object
and thus is not typesafe but requires ugly casting.Have searched through all issues and discussions here on GitHub, but without luck, so any help is very much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions