You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.amazon.ionhash.IonHashWriterImpl cannot be cast to com.amazon.ion.impl._Private_IonWriter
at com.amazon.ion.impl.lite.IonValueLite.writeTo(IonValueLite.java:993)
at com.amazon.ion.impl.lite.IonValueLite.writeChildren(IonValueLite.java:986)
at com.amazon.ion.impl.lite.IonStructLite.writeBodyTo(IonStructLite.java:809)
at com.amazon.ion.impl.lite.IonValueLite.writeTo(IonValueLite.java:1010)
at com.amazon.ion.impl.lite.IonValueLite.writeTo(IonValueLite.java:965)
at com.amazon.ionhash.IonHashWriterImpl.writeValue(IonHashWriterImpl.java:324)
This seems to only fail on Structs but I haven't tried too many other values. Is the IonHashWriter intended to support writes like this?
The text was updated successfully, but these errors were encountered:
This is a bug, although perhaps not too surprising as the focus has been solely on non-DOM usage. Wrapping the IonReader returned by IonSystem.newReader(IonValue) with an IonHashReader allows a hash to be computed from a DOM, but clearly doesn't address the "serialize an IonValue and compute its hash" use case suggested by the code above.
We could address this with changes to ion-hash-java; alternatively, fixing amazon-ion/ion-java#11 would enable other use cases as well (e.g., a schema-validating reader/writer).
Hello,
Just was experimenting with the IonHashWriter and encountered an error when writing an
IonStruct
DOM object.Stack trace (fails here)
This seems to only fail on Structs but I haven't tried too many other values. Is the IonHashWriter intended to support writes like this?
The text was updated successfully, but these errors were encountered: