From 06907552e96482ae66a43f4d5cd735432b7ccd65 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Sat, 24 Feb 2018 12:24:11 -0500 Subject: Swap for loop in favor of foreach Change-Id: I04b3691abd958a1455f55b8b295a7f08998b8692 Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java b/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java index 42cd190e95..55fe69bb9a 100644 --- a/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java +++ b/common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java @@ -73,12 +73,12 @@ public final class CryptoUtils { public static String byteArrayToHexString (byte[] b) { StringBuffer sb = new StringBuffer (b.length * 2); - for (int i = 0; i < b.length; i++) { - int v = b[i] & 0xff; + for (byte aB : b) { + int v = aB & 0xff; if (v < 16) { - sb.append ('0'); + sb.append('0'); } - sb.append (Integer.toHexString (v)); + sb.append(Integer.toHexString(v)); } return sb.toString ().toUpperCase (); } -- cgit 1.2.3-korg