Forbid use of java.security.MessageDigest#clone()

This commit forbids the usage of java.security.MessageDigest#clone() in
favor of getting a thread local instance using
org.elasticsearch.common.hash.MessageDigests. This is to prevent running
into java.lang.CloneNotSupportedExceptions for message digest providers
that do not support clone.

Closes #16543
This commit is contained in:
Jason Tedor 2016-02-09 10:43:10 -05:00
parent 0d4711c2fc
commit 75da71ff0b
1 changed files with 3 additions and 1 deletions

View File

@ -129,3 +129,5 @@ java.util.Collections#shuffle(java.util.List) @ Use java.util.Collections#shuffl
@defaultMessage Use org.elasticsearch.common.Randomness#get for reproducible sources of randomness
java.util.Random#<init>()
java.util.concurrent.ThreadLocalRandom
java.security.MessageDigest#clone() @ use org.elasticsearch.common.hash.MessageDigests