From 56996bd38f5f18fa14ed2c47b9cb2699ecea7d88 Mon Sep 17 00:00:00 2001 From: carltimmer Date: Thu, 15 Aug 2024 16:16:17 -0400 Subject: [PATCH] simplify --- java/org/jlab/coda/jevio/EventParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/jlab/coda/jevio/EventParser.java b/java/org/jlab/coda/jevio/EventParser.java index d219dc1d2..489be00cb 100644 --- a/java/org/jlab/coda/jevio/EventParser.java +++ b/java/org/jlab/coda/jevio/EventParser.java @@ -500,7 +500,7 @@ static TagSegmentHeader createTagSegmentHeader(byte bytes[], int offset, ByteOrd int word = ByteDataTransformer.toInt(bytes, byteOrder, offset); int len = word & 0xffff; - if ((len < 0) || (4*len + 4 + offset > bytes.length)) { + if (4*len + 4 + offset > bytes.length) { throw new EvioException("bad length in tagseg header (0x" + Integer.toHexString(len) + ")"); } header.setLength(len);