GoogleContainerTools / minikube-build-tools-for-java

Minikube lifecycle management tools for Gradle and Maven.
Apache License 2.0
57 stars 27 forks source link

Removes DigestException from BlobStream#writeTo. #53

Closed coollog closed 6 years ago

coollog commented 6 years ago

Realized it doesn't make sense for writeTo to throw a DigestException since the hashing should work fine if the algorithm is implemented correctly.

coollog commented 6 years ago

@elharo @loosebazooka This can be merged in before any of the rest.

loosebazooka commented 6 years ago

Do you mean that it would be our fault if the hashing isn't implemented correctly? Should it be an assertion error?

coollog commented 6 years ago

@loosebazooka It means it wouldn't be our fault if the hashing isn't implemented correctly. DescriptorDigest is where the DigestException is thrown, and the intent of that was to catch any invalid digests received over HTTP or from the user side. Digests generated by the JDK should always be valid.

coollog commented 6 years ago

Closing since these changes were added in #43