Skip to content

Commit

Permalink
o Bumped up dependencies and maven polugins
Browse files Browse the repository at this point in the history
    o Fixed javadoc
  • Loading branch information
elecharny committed Sep 6, 2023
1 parent 48de5d2 commit 677e729
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ public PriorityThreadPoolExecutor(int maximumPoolSize, Comparator<IoSession> com
* <li>All events are accepted</li>
* </ul>
*
* @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);
}

Expand All @@ -190,13 +190,13 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize) {
* <li>All events are accepted</li>
* </ul>
*
* @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);
}

/**
Expand All @@ -205,15 +205,15 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long ke
* <li>A default ThreadFactory</li>
* </ul>
*
* @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);
}

Expand All @@ -223,29 +223,29 @@ public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long ke
* <li>A default ThreadFactory</li>
* </ul>
*
* @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
* @param threadFactory The factory used to create threads
* @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<IoSession> comparator) {
// We have to initialize the pool with default values (0 and 1) in order
// to
Expand All @@ -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) {
Expand Down Expand Up @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>29</version>
<version>30</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -98,7 +98,7 @@
<version.bundle.plugin>5.1.9</version.bundle.plugin>
<version.changes.plugin>2.12.1</version.changes.plugin>
<version.checkstyle.plugin>3.3.0</version.checkstyle.plugin>
<version.clean.plugin>3.2.0</version.clean.plugin>
<version.clean.plugin>3.3.1</version.clean.plugin>
<version.clirr.plugin>2.8</version.clirr.plugin>
<version.cobertura.plugin>2.7</version.cobertura.plugin>
<version.compiler.plugin>3.11.0</version.compiler.plugin>
Expand All @@ -107,7 +107,7 @@
<version.deploy.plugin>3.1.1</version.deploy.plugin>
<version.docck.plugin>1.1</version.docck.plugin>
<version.eclipse.plugin>2.10</version.eclipse.plugin>
<version.enforcer.plugin>3.3.0</version.enforcer.plugin>
<version.enforcer.plugin>3.4.0</version.enforcer.plugin>
<version.findbugs.plugin>3.0.5</version.findbugs.plugin>
<version.gpg.plugin>3.1.0</version.gpg.plugin>
<version.install.plugin>3.1.1</version.install.plugin>
Expand All @@ -116,8 +116,8 @@
<version.javadoc.plugin>3.5.0</version.javadoc.plugin>
<version.jdepend.plugin>2.0</version.jdepend.plugin>
<version.jxr.plugin>3.3.0</version.jxr.plugin>
<version.model.plugin>3.6.3</version.model.plugin>
<version.plexus.utils>3.3.0</version.plexus.utils>
<version.model.plugin>3.9.4</version.model.plugin>
<version.plexus.utils>4.0.0</version.plexus.utils>
<version.plugin.plugin>3.9.0</version.plugin.plugin>
<version.pmd.plugin>3.21.0</version.pmd.plugin>
<version.project.plugin>3.0-alpha-2</version.project.plugin>
Expand All @@ -127,9 +127,9 @@
<version.remote.resources.plugin>3.1.0</version.remote.resources.plugin>
<version.resources.plugin>3.3.1</version.resources.plugin>
<version.scm.plugin>2.0.1</version.scm.plugin>
<version.site.plugin>4.0.0-M8</version.site.plugin>
<version.site.plugin>4.0.0-M9</version.site.plugin>
<version.source.plugin>3.3.0</version.source.plugin>
<version.shade.plugin>3.2.4</version.shade.plugin>
<version.shade.plugin>3.5.0</version.shade.plugin>
<version.surefire.plugin>3.1.2</version.surefire.plugin>
<version.surfire.report.plugin>3.1.2</version.surfire.report.plugin>
<version.taglist.plugin>3.0.0</version.taglist.plugin>
Expand All @@ -145,14 +145,14 @@
<version.junit>4.13.2</version.junit>
<version.jzlib>1.1.3</version.jzlib>
<version.log4j>1.2.17</version.log4j>
<version.ognl>3.2.15</version.ognl>
<version.ognl>3.3.4</version.ognl>
<version.pmd>4.3</version.pmd>
<version.rmock>2.0.2</version.rmock>
<version.slf4j.api>1.7.36</version.slf4j.api>
<version.slf4j.log4j12>1.7.36</version.slf4j.log4j12>
<version.slf4j.reload4j>1.7.36</version.slf4j.reload4j>
<version.slf4j.jcl.over.slf4j>1.7.36</version.slf4j.jcl.over.slf4j>
<version.springframework>2.5.6.SEC03</version.springframework>
<version.tomcat.jni>10.0.20</version.tomcat.jni>
<version.tomcat.jni>10.0.27</version.tomcat.jni>
<version.xbean.spring>4.23</version.xbean.spring>

<!-- OSGi minimum versions -->
Expand Down Expand Up @@ -321,8 +321,8 @@

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${version.slf4j.log4j12}</version>
<artifactId>slf4j-reload4j</artifactId>
<version>${version.slf4j.reload4j}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -368,7 +368,7 @@
<!-- logging implementation used for unit tests -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<artifactId>slf4j-reload4j</artifactId>
<scope>test</scope>
</dependency>

Expand Down

0 comments on commit 677e729

Please sign in to comment.