From 16703b4123a9929ec3c00b7099b715d1125337f5 Mon Sep 17 00:00:00 2001 From: Samith Date: Fri, 4 Oct 2024 14:11:13 -0400 Subject: [PATCH] [ELY-2850] Updated DEREncoder#flush to use isEmpty() instead of size() --- asn1/src/main/java/org/wildfly/security/asn1/DEREncoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asn1/src/main/java/org/wildfly/security/asn1/DEREncoder.java b/asn1/src/main/java/org/wildfly/security/asn1/DEREncoder.java index 91ee56c1cb3..0ab91bd1253 100644 --- a/asn1/src/main/java/org/wildfly/security/asn1/DEREncoder.java +++ b/asn1/src/main/java/org/wildfly/security/asn1/DEREncoder.java @@ -470,7 +470,7 @@ public void writeEncoded(byte[] encoded) { @Override public void flush() { - while (states.size() != 0) { + while (!states.isEmpty()) { EncoderState lastState = states.peekLast(); if (lastState.getTag() == SEQUENCE_TYPE) { endSequence();