Skip to content

Commit 65a837b

Browse files
committed
Add since to methods/types scheduled for removal
The two `MarkerFactory#getMarker` methods were marked as deprecated **before** the `2.0` release, therefore I find it safe to actually remove them.
1 parent dff06e7 commit 65a837b

14 files changed

+15
-101
lines changed

log4j-api/src/main/java/org/apache/logging/log4j/Logger.java

Lines changed: 4 additions & 50 deletions
Large diffs are not rendered by default.

log4j-api/src/main/java/org/apache/logging/log4j/MarkerManager.java

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.apache.logging.log4j;
1818

1919
import aQute.bnd.annotation.baseline.BaselineIgnore;
20-
import com.google.errorprone.annotations.InlineMe;
2120
import java.util.Arrays;
2221
import java.util.concurrent.ConcurrentHashMap;
2322
import java.util.concurrent.ConcurrentMap;
@@ -71,41 +70,6 @@ public static Marker getMarker(final String name) {
7170
return result;
7271
}
7372

74-
/**
75-
* Retrieves or creates a Marker with the specified parent. The parent must have been previously created.
76-
*
77-
* @param name The name of the Marker.
78-
* @param parent The name of the parent Marker.
79-
* @return The Marker with the specified name.
80-
* @throws IllegalArgumentException if the parent Marker does not exist.
81-
* @deprecated Use the Marker add or set methods to add parent Markers. Will be removed by final GA release.
82-
*/
83-
@Deprecated(forRemoval = true)
84-
public static Marker getMarker(final String name, final String parent) {
85-
final Marker parentMarker = MARKERS.get(parent);
86-
if (parentMarker == null) {
87-
throw new IllegalArgumentException("Parent Marker " + parent + " has not been defined");
88-
}
89-
return getMarker(name).addParents(parentMarker);
90-
}
91-
92-
/**
93-
* Retrieves or creates a Marker with the specified parent.
94-
*
95-
* @param name The name of the Marker.
96-
* @param parent The parent Marker.
97-
* @return The Marker with the specified name.
98-
* @throws IllegalArgumentException if any argument is {@code null}
99-
* @deprecated Use the Marker add or set methods to add parent Markers. Will be removed by final GA release.
100-
*/
101-
@InlineMe(
102-
replacement = "MarkerManager.getMarker(name).addParents(parent)",
103-
imports = "org.apache.logging.log4j.MarkerManager")
104-
@Deprecated(forRemoval = true)
105-
public static Marker getMarker(final String name, final Marker parent) {
106-
return getMarker(name).addParents(parent);
107-
}
108-
10973
/**
11074
* <em>Consider this class private, it is only public to satisfy Jackson for XML and JSON IO.</em>
11175
* <p>

log4j-api/src/main/java/org/apache/logging/log4j/message/AbstractMessageFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
*
2323
* @deprecated MessageFactory has default methods that implement all the methods that were here.
2424
*/
25-
@Deprecated
25+
@Deprecated(forRemoval = true, since = "3.0")
2626
public abstract class AbstractMessageFactory implements MessageFactory {}

log4j-api/src/main/java/org/apache/logging/log4j/message/Clearable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @deprecated use {@link ReusableMessage} directly
2323
*/
24-
@Deprecated(since = "3.0.0")
24+
@Deprecated(forRemoval = true, since = "3.0")
2525
interface Clearable {
2626

2727
/**

log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFactory2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
* @deprecated MessageFactory now contains all interface methods.
2323
* @since 2.6
2424
*/
25-
@Deprecated
25+
@Deprecated(forRemoval = true, since = "3.0")
2626
public interface MessageFactory2 extends MessageFactory {}

log4j-api/src/main/java/org/apache/logging/log4j/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @see <a href="http://logging.apache.org/log4j/2.x/manual/api.html">Log4j 2 API manual</a>
3838
*/
3939
@Export
40-
@Version("2.23.0")
40+
@Version("3.0.0")
4141
package org.apache.logging.log4j;
4242

4343
import org.osgi.annotation.bundle.Export;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
* @since 2.8
2525
* @deprecated use {@link ThreadContextMap} directly
2626
*/
27-
@Deprecated(since = "3.0.0")
27+
@Deprecated(forRemoval = true, since = "3.0")
2828
public interface CleanableThreadContextMap extends ThreadContextMap2 {}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,6 @@ void logIfEnabled(
637637
* @param msgSupplier A function, which when called, produces the desired log message.
638638
* @param t the exception to log, including its stack trace.
639639
*/
640-
@Deprecated(forRemoval = true)
641640
@SuppressWarnings("removal")
642641
void logIfEnabled(String fqcn, Level level, Marker marker, MessageSupplier msgSupplier, Throwable t);
643642

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
* @since 2.8
2525
* @deprecated use {@link ThreadContextMap} directly
2626
*/
27-
@Deprecated(since = "3.0.0")
27+
@Deprecated(forRemoval = true, since = "3.0")
2828
public interface ObjectThreadContextMap extends CleanableThreadContextMap {}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
* @since 2.7
2525
* @deprecated use {@link ThreadContextMap} directly
2626
*/
27-
@Deprecated(since = "3.0.0")
27+
@Deprecated(forRemoval = true, since = "3.0")
2828
public interface ThreadContextMap2 extends ThreadContextMap {}

0 commit comments

Comments
 (0)