Skip to content

Commit 5590b95

Browse files
committed
Why we create the array anew each time
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1744392 13f79535-47bb-0310-9956-ffa450edef68
1 parent 4a6c364 commit 5590b95

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main/java/org/apache/commons/codec/digest/MessageDigestAlgorithms.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public class MessageDigestAlgorithms {
128128
* @since 1.11
129129
*/
130130
public static String[] values() {
131+
// N.B. do not use a constant array here as that can be changed externally by accident or design
131132
return new String[] { MD2, MD5, SHA_1, SHA_224, SHA_256, SHA_384, SHA_512, SHA3_224, SHA3_256, SHA3_384, SHA3_512 };
132133
}
133134

0 commit comments

Comments
 (0)