ripple / crypto-conditions

A Java implementation of Crypto-Conditions (draft-thomas-crypto-conditions)
Apache License 2.0
5 stars 12 forks source link

Generic Fulfillment against incorrect Condition type throws java.lang.ClassCastException #19

Closed sappenin closed 6 years ago

sappenin commented 6 years ago

The signatures for verify are too narrow in each class like AbstractEd25519Sha256Fulfillment#verify. For example, if we have an Ed25519Sha256Fulfillment casted to a Fulfillment, and we want to call #verify with a different condition type that is not Ed25519Sha256Condition, we should simply get a result of false instead of a java.lang.ClassCastException. #