Skip to content

Commit eaa4e6b

Browse files
committed
delete isHexadecimal
1 parent 337bece commit eaa4e6b

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

jpos/src/main/java/org/jpos/iso/ISOUtil.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,6 @@ public static String zeropad(String s, int len) throws ISOException {
182182
return padleft(s, len, '0');
183183
}
184184

185-
public static boolean isHexadecimal(byte[] bytes) {
186-
for (byte b : bytes) {
187-
int unsignedByte = b & 0xFF;
188-
if (!((unsignedByte >= 0x30 && unsignedByte <= 0x39) || // Dígitos 0-9
189-
(unsignedByte >= 0x41 && unsignedByte <= 0x46) || // Letras A-F
190-
(unsignedByte >= 0x61 && unsignedByte <= 0x66))) { // Letras a-f
191-
return false;
192-
}
193-
}
194-
return true;
195-
}
196-
197185
/**
198186
* zeropads a long without throwing an ISOException (performs modulus operation)
199187
*

jpos/src/test/java/org/jpos/iso/ISOUtilTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void testHex2byte_ValidInput() {
6767
public void testHex2byte_InvalidInput_ThrowsExceptionWithMessage() {
6868

6969
Exception exception = assertThrows(IllegalArgumentException.class, () -> {
70-
ISOUtil.hex2byte("1111");
70+
ISOUtil.hex2byte("1A2B3C");
7171
}, "Not hex");
7272

7373
assertEquals("Not hex", exception.getMessage());

0 commit comments

Comments
 (0)