From 7ec06722923d96d2e51300bafb44b920ca341d58 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:49:58 +0100 Subject: ssb unit tests --- src/main/java/org/uic/barcode/Decoder.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/uic/barcode/Decoder.java') diff --git a/src/main/java/org/uic/barcode/Decoder.java b/src/main/java/org/uic/barcode/Decoder.java index 1b3fb0c..85faa4a 100644 --- a/src/main/java/org/uic/barcode/Decoder.java +++ b/src/main/java/org/uic/barcode/Decoder.java @@ -213,6 +213,13 @@ public class Decoder { } else { throw e; } + } catch (AssertionError e) { + dynamicFrame = null; + if (isSsbFrame(data)) { + decodeSsbFrame(data); + } else { + throw new EncodingFormatException(e.getMessage()); + } } } else if (isStaticHeader(data)){ @@ -292,7 +299,7 @@ public class Decoder { * @return true, if is static header */ private boolean isSsbFrame(byte[] data) { - if (data.length == 144) { + if (data.length == 114) { return true; } return false; -- cgit v1.2.3