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 b989408d8..1ac600d85 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 @@ -1541,10 +1541,9 @@ public String getHexDump(int length) { /** * Return hexdump of this buffer with limited length. * - * @param length The maximum number of bytes to dump from the current buffer - * position. - * @param pretty tells if the ourput should be verbose or not - * @return hexidecimal representation of this buffer + * @param length The maximum number of bytes to dump from the current buffer position. + * @param pretty tells if the output should be verbose or not + * @return hexadecimal representation of this buffer */ public String getHexDump(int length, boolean pretty) { return (pretty) ? IoBufferHexDumper.getPrettyHexDumpSlice(this, this.position(), Math.min(this.remaining(), length)) diff --git a/mina-core/src/main/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutor.java b/mina-core/src/main/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutor.java index 43f2f74ea..26aadbae3 100644 --- a/mina-core/src/main/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutor.java +++ b/mina-core/src/main/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutor.java @@ -175,11 +175,11 @@ public PriorityThreadPoolExecutor(int maximumPoolSize, Comparator com *
  • All events are accepted
  • * * - * @param corePoolSize The initial pool sizePoolSize + * @param minimumPoolSize The initial pool sizePoolSize * @param maximumPoolSize The maximum pool size */ - public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize) { - this(corePoolSize, maximumPoolSize, DEFAULT_KEEP_ALIVE, TimeUnit.SECONDS, Executors.defaultThreadFactory(), + public PriorityThreadPoolExecutor(int minimumPoolSize, int maximumPoolSize) { + this(minimumPoolSize, maximumPoolSize, DEFAULT_KEEP_ALIVE, TimeUnit.SECONDS, Executors.defaultThreadFactory(), null, null); } @@ -190,13 +190,13 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize) { *
  • All events are accepted
  • * * - * @param corePoolSize The initial pool sizePoolSize + * @param minimumPoolSize The initial pool sizePoolSize * @param maximumPoolSize The maximum pool size * @param keepAliveTime Default duration for a thread * @param unit Time unit used for the keepAlive value */ - public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit) { - this(corePoolSize, maximumPoolSize, keepAliveTime, unit, Executors.defaultThreadFactory(), null, null); + public PriorityThreadPoolExecutor(int minimumPoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit) { + this(minimumPoolSize, maximumPoolSize, keepAliveTime, unit, Executors.defaultThreadFactory(), null, null); } /** @@ -205,15 +205,15 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long ke *
  • A default ThreadFactory
  • * * - * @param corePoolSize The initial pool sizePoolSize + * @param minimumPoolSize The initial pool sizePoolSize * @param maximumPoolSize The maximum pool size * @param keepAliveTime Default duration for a thread * @param unit Time unit used for the keepAlive value * @param eventQueueHandler The queue used to store events */ - public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, + public PriorityThreadPoolExecutor(int minimumPoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, IoEventQueueHandler eventQueueHandler) { - this(corePoolSize, maximumPoolSize, keepAliveTime, unit, Executors.defaultThreadFactory(), eventQueueHandler, + this(minimumPoolSize, maximumPoolSize, keepAliveTime, unit, Executors.defaultThreadFactory(), eventQueueHandler, null); } @@ -223,21 +223,21 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long ke *
  • A default ThreadFactory
  • * * - * @param corePoolSize The initial pool sizePoolSize + * @param minimumPoolSize The initial pool sizePoolSize * @param maximumPoolSize The maximum pool size * @param keepAliveTime Default duration for a thread * @param unit Time unit used for the keepAlive value * @param threadFactory The factory used to create threads */ - public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, + public PriorityThreadPoolExecutor(int minimumPoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory) { - this(corePoolSize, maximumPoolSize, keepAliveTime, unit, threadFactory, null, null); + this(minimumPoolSize, maximumPoolSize, keepAliveTime, unit, threadFactory, null, null); } /** * Creates a new instance of a PrioritisedOrderedThreadPoolExecutor. * - * @param corePoolSize The initial pool sizePoolSize + * @param minimumPoolSize The initial pool sizePoolSize * @param maximumPoolSize The maximum pool size * @param keepAliveTime Default duration for a thread * @param unit Time unit used for the keepAlive value @@ -245,7 +245,7 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long ke * @param eventQueueHandler The queue used to store events * @param comparator The comparator used to prioritize the queue */ - public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, + public PriorityThreadPoolExecutor(int minimumPoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, ThreadFactory threadFactory, IoEventQueueHandler eventQueueHandler, Comparator comparator) { // We have to initialize the pool with default values (0 and 1) in order // to @@ -255,17 +255,17 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long ke super(DEFAULT_INITIAL_THREAD_POOL_SIZE, 1, keepAliveTime, unit, new SynchronousQueue<>(), threadFactory, new AbortPolicy()); - if (corePoolSize < DEFAULT_INITIAL_THREAD_POOL_SIZE) { - throw new IllegalArgumentException("corePoolSize: " + corePoolSize); + if (minimumPoolSize < DEFAULT_INITIAL_THREAD_POOL_SIZE) { + throw new IllegalArgumentException("minimumPoolSize: " + minimumPoolSize); } - if ((maximumPoolSize <= 0) || (maximumPoolSize < corePoolSize)) { + if ((maximumPoolSize <= 0) || (maximumPoolSize < minimumPoolSize)) { throw new IllegalArgumentException("maximumPoolSize: " + maximumPoolSize); } // Now, we can setup the pool sizes super.setMaximumPoolSize(maximumPoolSize); - super.setCorePoolSize(corePoolSize); + super.setCorePoolSize(minimumPoolSize); // The queueHandler might be null. if (eventQueueHandler == null) { @@ -718,21 +718,21 @@ public boolean remove(Runnable task) { * {@inheritDoc} */ @Override - public void setCorePoolSize(int corePoolSize) { - if (corePoolSize < 0) { - throw new IllegalArgumentException("corePoolSize: " + corePoolSize); + public void setCorePoolSize(int minimumPoolSize) { + if (minimumPoolSize < 0) { + throw new IllegalArgumentException("minimumPoolSize: " + minimumPoolSize); } - if (corePoolSize > super.getMaximumPoolSize()) { - throw new IllegalArgumentException("corePoolSize exceeds maximumPoolSize"); + if (minimumPoolSize > super.getMaximumPoolSize()) { + throw new IllegalArgumentException("minimumPoolSize exceeds maximumPoolSize"); } synchronized (workers) { - if (super.getCorePoolSize() > corePoolSize) { - for (int i = super.getCorePoolSize() - corePoolSize; i > 0; i--) { + if (super.getCorePoolSize() > minimumPoolSize) { + for (int i = super.getCorePoolSize() - minimumPoolSize; i > 0; i--) { removeWorker(); } } - super.setCorePoolSize(corePoolSize); + super.setCorePoolSize(minimumPoolSize); } } diff --git a/mina-core/src/test/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutorTest.java b/mina-core/src/test/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutorTest.java index 87b48ea3d..338fce501 100644 --- a/mina-core/src/test/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutorTest.java +++ b/mina-core/src/test/java/org/apache/mina/filter/executor/PriorityThreadPoolExecutorTest.java @@ -51,6 +51,8 @@ public class PriorityThreadPoolExecutorTest { * * This test asserts that, without a provided comparator, entries are * considered equal, when they reference the same session. + * + * @exception Exception If the test throw an exception */ @Test public void fifoEntryTestNoComparatorSameSession() throws Exception { @@ -73,6 +75,8 @@ public void fifoEntryTestNoComparatorSameSession() throws Exception { * * This test asserts that, without a provided comparator, the first entry * created is 'less than' an entry that is created later. + * + * @exception Exception If the test throw an exception */ @Test public void fifoEntryTestNoComparatorDifferentSession() throws Exception { @@ -96,6 +100,8 @@ public void fifoEntryTestNoComparatorDifferentSession() throws Exception { * This test asserts that, with a provided comparator, entries are * considered equal, when they reference the same session (the provided * comparator is ignored). + * + * @exception Exception If the test throw an exception */ @Test public void fifoEntryTestWithComparatorSameSession() throws Exception { @@ -128,6 +134,8 @@ public int compare(IoSession o1, IoSession o2) { * This test asserts that a provided comparator is used instead of the * (fallback) default behavior (when entries are referring different * sessions). + * + * @exception Exception If the test throw an exception */ @Test public void fifoEntryTestComparatorDifferentSession() throws Exception { @@ -165,6 +173,8 @@ public int compare(IoSession o1, IoSession o2) { * Each session records the timestamp of its last activity. After all work * has been processed, the test asserts that the last activity of all * sessions was later than the last activity of the preferred session. + * + * @exception Throwable If the test throw an exception */ @Test @Ignore("This test faiuls randomly") diff --git a/mina-core/src/test/java/org/apache/mina/filter/ssl/SslIdentificationAlgorithmTest.java b/mina-core/src/test/java/org/apache/mina/filter/ssl/SslIdentificationAlgorithmTest.java index f946b7e09..5f240614a 100644 --- a/mina-core/src/test/java/org/apache/mina/filter/ssl/SslIdentificationAlgorithmTest.java +++ b/mina-core/src/test/java/org/apache/mina/filter/ssl/SslIdentificationAlgorithmTest.java @@ -166,6 +166,8 @@ public void shouldFailAuthenticationWhenClientMissingSNIAndIdentificationAlgorit /** * Subject Alternative Name (SAN) scenarios + * + * @exception Exception If the test throws an exception */ @Test public void shouldAuthenticateWhenServerCertificateAlternativeNameMatchesClientSNIExactly() throws Exception { diff --git a/pom.xml b/pom.xml index bc86f69aa..b2684f296 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.apache apache - 29 + 30 @@ -98,7 +98,7 @@ 5.1.9 2.12.1 3.3.0 - 3.2.0 + 3.3.1 2.8 2.7 3.11.0 @@ -107,7 +107,7 @@ 3.1.1 1.1 2.10 - 3.3.0 + 3.4.0 3.0.5 3.1.0 3.1.1 @@ -116,8 +116,8 @@ 3.5.0 2.0 3.3.0 - 3.6.3 - 3.3.0 + 3.9.4 + 4.0.0 3.9.0 3.21.0 3.0-alpha-2 @@ -127,9 +127,9 @@ 3.1.0 3.3.1 2.0.1 - 4.0.0-M8 + 4.0.0-M9 3.3.0 - 3.2.4 + 3.5.0 3.1.2 3.1.2 3.0.0 @@ -145,14 +145,14 @@ 4.13.2 1.1.3 1.2.17 - 3.2.15 + 3.3.4 4.3 2.0.2 1.7.36 - 1.7.36 + 1.7.36 1.7.36 2.5.6.SEC03 - 10.0.20 + 10.0.27 4.23 @@ -321,8 +321,8 @@ org.slf4j - slf4j-log4j12 - ${version.slf4j.log4j12} + slf4j-reload4j + ${version.slf4j.reload4j} @@ -368,7 +368,7 @@ org.slf4j - slf4j-log4j12 + slf4j-reload4j test