1 | if (provider != null) {↵ | | 1 | if ((provider != null) && !"".equals(provider) && !"null".equals(provider)) {↵
|
2 | try {↵ | | 2 | try {↵
|
3 | messageDigest = MessageDigest.getInstance(algorithm, provider);↵ | | 3 | messageDigest = MessageDigest.getInstance(algorithm, provider);↵
|
4 | } catch (NoSuchAlgorithmException noalgo) {↵ | | 4 | } catch (NoSuchAlgorithmException noalgo) {↵
|
5 | throw new BuildException(noalgo, getLocation());↵ | | 5 | throw new BuildException(noalgo);↵
|
6 | } catch (NoSuchProviderException noprovider) {↵ | | 6 | } catch (NoSuchProviderException noprovider) {↵
|
7 | throw new BuildException(noprovider, getLocation());↵ | | 7 | throw new BuildException(noprovider);↵
|
8 | }↵ | | 8 | }↵
|
9 | } else {↵ | | 9 | } else {↵
|
10 | try {↵ | | 10 | try {↵
|
11 | messageDigest = MessageDigest.getInstance(algorithm);↵ | | 11 | messageDigest = MessageDigest.getInstance(algorithm);↵
|
12 | } catch (NoSuchAlgorithmException noalgo) {↵ | | 12 | } catch (NoSuchAlgorithmException noalgo) {↵
|
13 | throw new BuildException(noalgo, getLocation());↵ | | 13 | throw new BuildException(noalgo);↵
|
14 | | | 14 |
|