decentralized-identity / jsonld-common-java

Shared JSON-LD Java library.
Apache License 2.0
7 stars 6 forks source link

java.net.HttpClient not found in Runtime (Android) #5

Closed vitorpamplona closed 2 years ago

vitorpamplona commented 2 years ago

Hi all,

Is it possible to not enforce the use of a DocumentLoader that has a direct dependency on java.net.http.HttpClient?

java.net.http.HttpClient has been deprecated and Android systems won't work with it anymore.

This line requires the default ConfigurableDocumentLoader even if I am reimplementing the loader entirely. I can only change the loader after the Default one has been loaded. And since it statically depends on java.net.HttpClient which I don't have in Runtime, the system crashes before I even get a chance to change the loader to my own implementation.

Is it possible to have a JsonLDObject without a default document loader?

peacekeeper commented 2 years ago

@vitorpamplona thanks for this comment, very interesting!

I created PR https://github.com/decentralized-identity/jsonld-common-java/pull/6 for this, would you mind reviewing?

Also feel free to suggest changes, or do your own PR if you have a better idea how to do it!

peacekeeper commented 2 years ago

Merged the PR, feel free to close this if you think it has been addressed.