Skip to content

Commit 9410369

Browse files
committed
Fix Javadoc: These APIs actually throw IllegalArgumentException, not RuntimeException.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1814681 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3d9bb60 commit 9410369

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class Md5Crypt {
7070
*
7171
* @param keyBytes plaintext string to hash.
7272
* @return the hash value
73-
* @throws RuntimeException when a {@link java.security.NoSuchAlgorithmException} is caught. *
73+
* @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. *
7474
* @see #apr1Crypt(byte[], String)
7575
*/
7676
public static String apr1Crypt(final byte[] keyBytes) {
@@ -93,7 +93,7 @@ public static String apr1Crypt(final byte[] keyBytes) {
9393
* @return the hash value
9494
* @throws IllegalArgumentException
9595
* if the salt does not match the allowed pattern
96-
* @throws RuntimeException
96+
* @throws IllegalArgumentException
9797
* when a {@link java.security.NoSuchAlgorithmException} is caught.
9898
*/
9999
public static String apr1Crypt(final byte[] keyBytes, String salt) {
@@ -114,7 +114,7 @@ public static String apr1Crypt(final byte[] keyBytes, String salt) {
114114
* @param keyBytes
115115
* plaintext string to hash.
116116
* @return the hash value
117-
* @throws RuntimeException
117+
* @throws IllegalArgumentException
118118
* when a {@link java.security.NoSuchAlgorithmException} is caught.
119119
* @see #apr1Crypt(byte[], String)
120120
*/
@@ -137,7 +137,7 @@ public static String apr1Crypt(final String keyBytes) {
137137
* @return the hash value
138138
* @throws IllegalArgumentException
139139
* if the salt does not match the allowed pattern
140-
* @throws RuntimeException
140+
* @throws IllegalArgumentException
141141
* when a {@link java.security.NoSuchAlgorithmException} is caught.
142142
*/
143143
public static String apr1Crypt(final String keyBytes, final String salt) {
@@ -156,7 +156,7 @@ public static String apr1Crypt(final String keyBytes, final String salt) {
156156
* @param keyBytes
157157
* plaintext string to hash.
158158
* @return the hash value
159-
* @throws RuntimeException
159+
* @throws IllegalArgumentException
160160
* when a {@link java.security.NoSuchAlgorithmException} is caught.
161161
* @see #md5Crypt(byte[], String)
162162
*/
@@ -179,7 +179,7 @@ public static String md5Crypt(final byte[] keyBytes) {
179179
* @return the hash value
180180
* @throws IllegalArgumentException
181181
* if the salt does not match the allowed pattern
182-
* @throws RuntimeException
182+
* @throws IllegalArgumentException
183183
* when a {@link java.security.NoSuchAlgorithmException} is caught.
184184
*/
185185
public static String md5Crypt(final byte[] keyBytes, final String salt) {
@@ -203,7 +203,7 @@ public static String md5Crypt(final byte[] keyBytes, final String salt) {
203203
* @return the hash value
204204
* @throws IllegalArgumentException
205205
* if the salt does not match the allowed pattern
206-
* @throws RuntimeException
206+
* @throws IllegalArgumentException
207207
* when a {@link java.security.NoSuchAlgorithmException} is caught.
208208
*/
209209
public static String md5Crypt(final byte[] keyBytes, final String salt, final String prefix) {

0 commit comments

Comments
 (0)