diff options
author | Mykola Nikishov | 2018-02-14 23:38:39 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-02-15 06:49:32 +0000 |
commit | 0978d682ad394e4af137a145b084e0e94757b3fc (patch) | |
tree | c881a7014d056e81912964b6b68ea5678a5255e9 | |
parent | 7a3f47f361781e5d82614aa1cdf4ab0d0a849cf7 (diff) | |
download | rt.equinox.p2-0978d682ad394e4af137a145b084e0e94757b3fc.tar.gz rt.equinox.p2-0978d682ad394e4af137a145b084e0e94757b3fc.tar.xz rt.equinox.p2-0978d682ad394e4af137a145b084e0e94757b3fc.zip |
Bug 423715 - Use enhanced loop in MD5Verifier
Change-Id: I5c134ad37433f7868defe060b34fe40a8d8e820a
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java index e94e40297..9dfca3f4f 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java @@ -74,10 +74,10 @@ public class MD5Verifier extends ProcessingStep { public void close() throws IOException { byte[] digest = md5.digest(); StringBuffer buf = new StringBuffer(); - for (int i = 0; i < digest.length; i++) { - if ((digest[i] & 0xFF) < 0x10) + for (byte element : digest) { + if ((element & 0xFF) < 0x10) buf.append('0'); - buf.append(Integer.toHexString(digest[i] & 0xFF)); + buf.append(Integer.toHexString(element & 0xFF)); } // if the hashes don't line up set the status to error. |