From 28fa18278c1f3a87722d5e8b78f581526a30bb38 Mon Sep 17 00:00:00 2001 From: Yuuta Liang Date: Sat, 14 Oct 2023 05:35:17 +0800 Subject: Fix lint Signed-off-by: Yuuta Liang --- src/main/model/asn1/ASN1Length.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/main/model/asn1/ASN1Length.java') diff --git a/src/main/model/asn1/ASN1Length.java b/src/main/model/asn1/ASN1Length.java index e85689c..913b35a 100644 --- a/src/main/model/asn1/ASN1Length.java +++ b/src/main/model/asn1/ASN1Length.java @@ -4,8 +4,6 @@ import model.asn1.exceptions.ParseException; import model.asn1.parsing.BytesReader; import ui.Utils; -import java.util.Arrays; - /** * Represents the Length part in DER encoding. It appears after Tag and before Value. It represents the length of the * encoded Value in bytes. @@ -31,11 +29,11 @@ public class ASN1Length implements Encodable { /** * EFFECTS: Parse the length from the given DER input. - * Throws {@link ParseException} if the input is invalid: - * - Indefinite length - * - Not enough bytes - * - Initial byte 0b11111111 (See X.690$8.1.3.5) - * - Value too long (compliant to RFC but unsupported by this program): multibyte and # of bytes > 3 + * Throws {@link ParseException} if the input is invalid: + * - Indefinite length + * - Not enough bytes + * - Initial byte 0b11111111 (See X.690$8.1.3.5) + * - Value too long (compliant to RFC but unsupported by this program): multibyte and # of bytes > 3 * MODIFIES: reader (bytes are read, at least one byte, at most 5 bytes) */ public ASN1Length(BytesReader reader) throws ParseException { @@ -78,7 +76,7 @@ public class ASN1Length implements Encodable { // DER prefers the shortest form. if (length <= 127) { // Possible in a single byte. - return new Byte[]{ (byte) length }; + return new Byte[]{(byte) length}; } else { // Big-endian encoding of the length. DER uses big-endian. final Byte[] lengthBytes = Utils.valToByte(length); -- cgit v1.2.3