Skip to content

Commit bd40913

Browse files
authored
Remove ancient test fixtures and dependencies (#3039)
This removes: * the test dependency on `oro:oro` and the `VelocityTest`, which uses Apache Velocity 1.7 for no clear reason. * all disabled tests in `DomTestCase`, * all the test fixtures that were only used by those tests.
1 parent a306d95 commit bd40913

30 files changed

+90
-1414
lines changed

log4j-1.2-api/pom.xml

+20-14
Original file line numberDiff line numberDiff line change
@@ -51,85 +51,91 @@
5151
</properties>
5252

5353
<dependencies>
54+
5455
<!-- Used for JMS appenders (needs an implementation of course) -->
5556
<dependency>
5657
<groupId>javax.jms</groupId>
5758
<artifactId>javax.jms-api</artifactId>
5859
<scope>provided</scope>
59-
<optional>true</optional>
6060
</dependency>
61-
<!-- Log4j Runtime -->
61+
62+
<dependency>
63+
<groupId>org.jspecify</groupId>
64+
<artifactId>jspecify</artifactId>
65+
<scope>test</scope>
66+
</dependency>
67+
6268
<dependency>
6369
<groupId>org.apache.logging.log4j</groupId>
6470
<artifactId>log4j-api</artifactId>
6571
</dependency>
72+
6673
<dependency>
6774
<groupId>org.apache.logging.log4j</groupId>
6875
<artifactId>log4j-core</artifactId>
6976
<optional>true</optional>
7077
</dependency>
78+
7179
<dependency>
7280
<groupId>org.apache.logging.log4j</groupId>
7381
<artifactId>log4j-api-test</artifactId>
7482
<scope>test</scope>
7583
</dependency>
84+
7685
<dependency>
7786
<groupId>org.apache.logging.log4j</groupId>
7887
<artifactId>log4j-core-test</artifactId>
7988
<scope>test</scope>
8089
</dependency>
90+
8191
<dependency>
8292
<groupId>org.awaitility</groupId>
8393
<artifactId>awaitility</artifactId>
8494
<scope>test</scope>
8595
</dependency>
96+
8697
<dependency>
8798
<groupId>commons-io</groupId>
8899
<artifactId>commons-io</artifactId>
89100
<scope>test</scope>
90101
</dependency>
102+
91103
<dependency>
92104
<groupId>org.apache.commons</groupId>
93105
<artifactId>commons-lang3</artifactId>
94106
<scope>test</scope>
95107
</dependency>
108+
96109
<dependency>
97110
<groupId>com.fasterxml.jackson.dataformat</groupId>
98111
<artifactId>jackson-dataformat-xml</artifactId>
99112
<scope>test</scope>
100113
</dependency>
114+
101115
<dependency>
102116
<groupId>org.junit.jupiter</groupId>
103117
<artifactId>junit-jupiter-engine</artifactId>
104118
<scope>test</scope>
105119
</dependency>
120+
106121
<dependency>
107122
<groupId>org.junit.jupiter</groupId>
108123
<artifactId>junit-jupiter-params</artifactId>
109124
<scope>test</scope>
110125
</dependency>
111-
<!-- JUnit -->
126+
112127
<dependency>
113128
<groupId>org.junit.vintage</groupId>
114129
<artifactId>junit-vintage-engine</artifactId>
115130
<scope>test</scope>
116131
</dependency>
132+
117133
<dependency>
118134
<groupId>org.mockito</groupId>
119135
<artifactId>mockito-core</artifactId>
120136
<scope>test</scope>
121137
</dependency>
122-
<!-- 1.2 tests -->
123-
<dependency>
124-
<groupId>oro</groupId>
125-
<artifactId>oro</artifactId>
126-
<scope>test</scope>
127-
</dependency>
128-
<dependency>
129-
<groupId>org.apache.velocity</groupId>
130-
<artifactId>velocity</artifactId>
131-
<scope>test</scope>
132-
</dependency>
138+
133139
</dependencies>
134140

135141
<profiles>

log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java

-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public class XmlConfiguration extends Log4j1Configuration {
9090
private static final String INTERNAL_DEBUG_ATTR = "debug";
9191
private static final String THRESHOLD_ATTR = "threshold";
9292
private static final String EMPTY_STR = "";
93-
private static final Class<?>[] ONE_STRING_PARAM = new Class[] {String.class};
9493
private static final String dbfKey = "javax.xml.parsers.DocumentBuilderFactory";
9594
private static final String THROWABLE_RENDERER_TAG = "throwableRenderer";
9695

@@ -504,7 +503,6 @@ private void parseErrorHandler(Element element, Appender appender) {
504503
/**
505504
* Used internally to parse a filter element.
506505
* @param filterElement The Filter Element.
507-
* @return The Filter.
508506
*/
509507
public void addFilter(final AtomicReference<Filter> ref, final Element filterElement) {
510508
final Filter value = parseFilters(filterElement);

log4j-1.2-api/src/test/java/org/apache/log4j/VelocityTest.java

-60
This file was deleted.

log4j-1.2-api/src/test/java/org/apache/log4j/util/AbsoluteDateAndTimeFilter.java

-35
This file was deleted.

log4j-1.2-api/src/test/java/org/apache/log4j/util/AbsoluteTimeFilter.java

-34
This file was deleted.

0 commit comments

Comments
 (0)