You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2026/05/29 08:38:32 UTC

(mina) branch 2.1.X updated: Avoid duplicated code

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch 2.1.X
in repository https://gitbox.apache.org/repos/asf/mina.git


The following commit(s) were added to refs/heads/2.1.X by this push:
     new b49b6f21e Avoid duplicated code
b49b6f21e is described below

commit b49b6f21e072cc6259dae87b88a5084684b34b31
Author: Emmanuel Lécharny <em...@worteks.com>
AuthorDate: Fri May 29 10:38:07 2026 +0200

    Avoid duplicated code
---
 .../src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java b/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java
index 48e924ed9..f5aa45b99 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/AbstractIoBuffer.java
@@ -2237,13 +2237,13 @@ public abstract class AbstractIoBuffer extends IoBuffer {
 
                 if (clazz.isArray() || clazz.isPrimitive() || !Serializable.class.isAssignableFrom(clazz)) {
                     write(0);
-                    super.writeClassDescriptor(desc);
                 } else {
                     // Serializable class
                     write(1);
                     writeUTF(desc.getName());
-                    super.writeClassDescriptor(desc);
                 }
+
+                super.writeClassDescriptor(desc);
             }
         }) {
             out.writeObject(o);