File tree 1 file changed +6
-4
lines changed
src/main/java/net/lingala/zip4j/model/enums
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
package net .lingala .zip4j .model .enums ;
2
2
3
+ import net .lingala .zip4j .exception .ZipException ;
4
+
3
5
/**
4
6
* Indicates the AES format used
5
7
*/
6
8
public enum AesVersion {
7
9
8
10
/**
9
- * Version 1 of the AES format
11
+ * Version 1 of the AES format
10
12
*/
11
13
ONE (1 ),
12
14
/**
13
- * Version 2 of the AES format
15
+ * Version 2 of the AES format
14
16
*/
15
17
TWO (2 );
16
18
@@ -32,13 +34,13 @@ public int getVersionNumber() {
32
34
* @return the AESVersion instance for a given version
33
35
* @throws IllegalArgumentException if an unsupported version is given
34
36
*/
35
- public static AesVersion getFromVersionNumber (int versionNumber ) {
37
+ public static AesVersion getFromVersionNumber (int versionNumber ) throws ZipException {
36
38
for (AesVersion aesVersion : values ()) {
37
39
if (aesVersion .versionNumber == versionNumber ) {
38
40
return aesVersion ;
39
41
}
40
42
}
41
43
42
- throw new IllegalArgumentException ("Unsupported Aes version" );
44
+ throw new ZipException ("Unsupported Aes version" );
43
45
}
44
46
}
You can’t perform that action at this time.
0 commit comments