Skip to content

Commit 4e39c3f

Browse files
committed
Fix Javadoc warnings (Java 21)
1 parent 579b29a commit 4e39c3f

File tree

8 files changed

+53
-4
lines changed

8 files changed

+53
-4
lines changed

src/main/java/org/apache/commons/pool2/BaseKeyedPooledObjectFactory.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
*/
3535
public abstract class BaseKeyedPooledObjectFactory<K, V> extends BaseObject implements KeyedPooledObjectFactory<K, V> {
3636

37+
/**
38+
* Constructs a new instance.
39+
*/
40+
public BaseKeyedPooledObjectFactory() {
41+
// empty
42+
}
43+
3744
/**
3845
* Reinitializes an instance to be returned by the pool.
3946
* <p>

src/main/java/org/apache/commons/pool2/BaseObject.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
*/
2424
public abstract class BaseObject {
2525

26+
/**
27+
* Constructs a new instance.
28+
*/
29+
public BaseObject() {
30+
// empty
31+
}
32+
2633
@Override
2734
public String toString() {
2835
final StringBuilder builder = new StringBuilder();

src/main/java/org/apache/commons/pool2/BaseObjectPool.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public abstract class BaseObjectPool<T> extends BaseObject implements ObjectPool
3131

3232
private volatile boolean closed;
3333

34+
/**
35+
* Constructs a new instance.
36+
*/
37+
public BaseObjectPool() {
38+
// empty
39+
}
40+
3441
/**
3542
* Not supported in this base implementation. Subclasses should override
3643
* this behavior.

src/main/java/org/apache/commons/pool2/BasePooledObjectFactory.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
*/
3333
public abstract class BasePooledObjectFactory<T> extends BaseObject implements PooledObjectFactory<T> {
3434

35+
/**
36+
* Constructs a new instance.
37+
*/
38+
public BasePooledObjectFactory() {
39+
// empty
40+
}
41+
3542
/**
3643
* No-op.
3744
*

src/main/java/org/apache/commons/pool2/impl/BaseObjectPoolConfig.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,13 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon
291291

292292
private String jmxNameBase = DEFAULT_JMX_NAME_BASE;
293293

294+
/**
295+
* Constructs a new instance.
296+
*/
297+
public BaseObjectPoolConfig() {
298+
// empty
299+
}
300+
294301
/**
295302
* Gets the value for the {@code blockWhenExhausted} configuration attribute for pools created with this configuration instance.
296303
*

src/main/java/org/apache/commons/pool2/impl/DefaultEvictionPolicy.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@
4242
*/
4343
public class DefaultEvictionPolicy<T> implements EvictionPolicy<T> {
4444

45+
/**
46+
* Constructs a new instance.
47+
*/
48+
public DefaultEvictionPolicy() {
49+
// empty
50+
}
51+
4552
@Override
4653
public boolean evict(final EvictionConfig config, final PooledObject<T> underTest, final int idleCount) {
4754
// @formatter:off

src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,6 @@ public T borrowObject(final Duration borrowMaxWaitDuration) throws Exception {
363363
return p.getObject();
364364
}
365365

366-
private Duration durationSince(final Instant startInstant) {
367-
return Duration.between(startInstant, Instant.now());
368-
}
369-
370366
/**
371367
* Borrows an object from the pool using the specific waiting time which only
372368
* applies if {@link #getBlockWhenExhausted()} is true.
@@ -604,6 +600,10 @@ private void destroy(final PooledObject<T> toDestroy, final DestroyMode destroyM
604600
}
605601
}
606602

603+
private Duration durationSince(final Instant startInstant) {
604+
return Duration.between(startInstant, Instant.now());
605+
}
606+
607607
/**
608608
* Tries to ensure that {@code idleCount} idle instances exist in the pool.
609609
* <p>

src/main/java/org/apache/commons/pool2/impl/GenericObjectPoolConfig.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public class GenericObjectPoolConfig<T> extends BaseObjectPoolConfig<T> {
5757

5858
private int minIdle = DEFAULT_MIN_IDLE;
5959

60+
/**
61+
* Constructs a new instance.
62+
*/
63+
public GenericObjectPoolConfig() {
64+
// empty
65+
}
66+
6067
@SuppressWarnings("unchecked")
6168
@Override
6269
public GenericObjectPoolConfig<T> clone() {

0 commit comments

Comments
 (0)