Skip to content

Commit b3391ef

Browse files
committed
Document log4j-api changes in version 2.22.0
1 parent 8f5df03 commit b3391ef

File tree

7 files changed

+18
-1
lines changed

7 files changed

+18
-1
lines changed

log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,9 @@ public void entry() {
687687
entry(FQCN, (Object[]) null);
688688
}
689689

690+
/**
691+
* @deprecated since 2.22.0, use {@link #traceEntry(String, Object...)} instead.
692+
*/
690693
@Deprecated
691694
@Override
692695
public void entry(final Object... params) {

log4j-api/src/main/java/org/apache/logging/log4j/util/Base64Util.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ private Base64Util() {}
5656

5757
/**
5858
* This method does not specify an encoding for the {@code str} parameter and should not be used.
59+
* @deprecated since 2.22.0, use {@link java.util.Base64} instead.
5960
*/
6061
@Deprecated
6162
public static String encode(final String str) {

log4j-api/src/main/java/org/apache/logging/log4j/util/Cast.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
*/
1717
package org.apache.logging.log4j.util;
1818

19+
/**
20+
* @since 2.22.0
21+
*/
1922
@InternalApi
2023
public final class Cast {
2124

log4j-api/src/main/java/org/apache/logging/log4j/util/InternalException.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
/**
2020
* Exception thrown when an error occurs while accessing internal resources. This is generally used to
2121
* convert checked exceptions to runtime exceptions.
22+
*
23+
* @since 2.22.0
2224
*/
2325
public class InternalException extends RuntimeException {
2426

log4j-api/src/main/java/org/apache/logging/log4j/util/Lazy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Provides a lazily-initialized value from a {@code Supplier<T>}.
2525
*
2626
* @param <T> type of value
27+
* @since 2.22.0
2728
*/
2829
public interface Lazy<T> extends Supplier<T> {
2930
/**

log4j-api/src/main/java/org/apache/logging/log4j/util/LazyBoolean.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
import java.util.concurrent.locks.ReentrantLock;
2121
import java.util.function.BooleanSupplier;
2222

23+
/**
24+
* @since 2.22.0
25+
*/
2326
public class LazyBoolean implements BooleanSupplier {
2427
private final BooleanSupplier supplier;
2528
private final Lock lock = new ReentrantLock();

log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,15 @@ private LoaderUtil() {}
8787
* Returns the ClassLoader to use.
8888
*
8989
* @return the ClassLoader.
90+
* @since 2.22.0
9091
*/
9192
public static ClassLoader getClassLoader() {
9293
return getClassLoader(LoaderUtil.class, null);
9394
}
9495

96+
/**
97+
* @since 2.22.0
98+
*/
9599
// TODO: this method could use some explanation
96100
public static ClassLoader getClassLoader(final Class<?> class1, final Class<?> class2) {
97101
PrivilegedAction<ClassLoader> action = () -> {
@@ -350,7 +354,7 @@ public static <T> T newCheckedInstanceOfProperty(final String propertyName, fina
350354
* @throws IllegalAccessException if the class can't be instantiated through a public constructor
351355
* @throws InstantiationException if the provided class is abstract or an interface
352356
* @throws InvocationTargetException if an exception is thrown by the constructor
353-
* @since 2.22
357+
* @since 2.22.0
354358
*/
355359
public static <T> T newCheckedInstanceOfProperty(
356360
final String propertyName, final Class<T> clazz, final Supplier<T> defaultSupplier)

0 commit comments

Comments
 (0)