Skip to content

Commit 73733da

Browse files
vlsivy
andauthored
Remove the com.github.spotbugs:spotbugs-annotations dependency (#3984, #3985)
Co-authored-by: Volkan Yazıcı <[email protected]>
1 parent 4b7065b commit 73733da

File tree

121 files changed

+403
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+403
-129
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ updates:
9090
registries:
9191
- maven-central
9292
ignore:
93-
# `com.github.spotbugs:spotbugs-annotations:4.9.0` and onwards require Java 11
94-
- dependency-name: "com.github.spotbugs:spotbugs-annotations"
95-
versions: [ "[4.9.0,)" ]
9693
# Jetty 10.x does not have an internal logging API
9794
- dependency-name: "org.eclipse.jetty:*"
9895
versions: [ "[10,)" ]

log4j-1.2-api/src/main/java/org/apache/log4j/DefaultThrowableRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
*/
1717
package org.apache.log4j;
1818

19-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2019
import java.io.IOException;
2120
import java.io.InterruptedIOException;
2221
import java.io.LineNumberReader;
2322
import java.io.PrintWriter;
2423
import java.io.StringReader;
2524
import java.io.StringWriter;
2625
import java.util.ArrayList;
26+
import org.apache.log4j.internal.annotation.SuppressFBWarnings;
2727
import org.apache.log4j.spi.ThrowableRenderer;
2828

2929
/**

log4j-1.2-api/src/main/java/org/apache/log4j/FileAppender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
package org.apache.log4j;
1818

19-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2019
import java.io.BufferedWriter;
2120
import java.io.File;
2221
import java.io.FileNotFoundException;
@@ -26,6 +25,7 @@
2625
import java.io.Writer;
2726
import org.apache.log4j.helpers.LogLog;
2827
import org.apache.log4j.helpers.QuietWriter;
28+
import org.apache.log4j.internal.annotation.SuppressFBWarnings;
2929
import org.apache.log4j.spi.ErrorCode;
3030

3131
/**

log4j-1.2-api/src/main/java/org/apache/log4j/Hierarchy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
package org.apache.log4j;
1818

19-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2019
import java.util.Enumeration;
2120
import java.util.Hashtable;
2221
import java.util.Vector;
@@ -25,6 +24,7 @@
2524
import java.util.concurrent.ConcurrentMap;
2625
import org.apache.log4j.helpers.LogLog;
2726
import org.apache.log4j.helpers.OptionConverter;
27+
import org.apache.log4j.internal.annotation.SuppressFBWarnings;
2828
import org.apache.log4j.legacy.core.ContextUtil;
2929
import org.apache.log4j.or.ObjectRenderer;
3030
import org.apache.log4j.or.RendererMap;

log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
package org.apache.log4j;
1818

19-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2019
import java.io.IOException;
2120
import java.io.InputStream;
2221
import java.io.InterruptedIOException;
@@ -37,6 +36,7 @@
3736
import org.apache.log4j.helpers.FileWatchdog;
3837
import org.apache.log4j.helpers.LogLog;
3938
import org.apache.log4j.helpers.OptionConverter;
39+
import org.apache.log4j.internal.annotation.SuppressFBWarnings;
4040
import org.apache.log4j.or.RendererMap;
4141
import org.apache.log4j.spi.Configurator;
4242
import org.apache.log4j.spi.ErrorHandler;

log4j-1.2-api/src/main/java/org/apache/log4j/RollingFileAppender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
*/
1717
package org.apache.log4j;
1818

19-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2019
import java.io.File;
2120
import java.io.IOException;
2221
import java.io.InterruptedIOException;
2322
import java.io.Writer;
2423
import org.apache.log4j.helpers.CountingQuietWriter;
2524
import org.apache.log4j.helpers.LogLog;
2625
import org.apache.log4j.helpers.OptionConverter;
26+
import org.apache.log4j.internal.annotation.SuppressFBWarnings;
2727
import org.apache.log4j.spi.LoggingEvent;
2828

2929
/**

log4j-1.2-api/src/main/java/org/apache/log4j/helpers/FileWatchdog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
*/
1717
package org.apache.log4j.helpers;
1818

19-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2019
import java.io.File;
20+
import org.apache.log4j.internal.annotation.SuppressFBWarnings;
2121

2222
/**
2323
* Checks every now and then that a certain file has not changed. If it has, then call the {@link #doOnChange} method.

log4j-1.2-api/src/main/java/org/apache/log4j/helpers/UtilLoggingLevel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
import static org.apache.logging.log4j.util.Strings.toRootUpperCase;
2020

21-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2221
import java.util.ArrayList;
2322
import java.util.List;
2423
import org.apache.log4j.Level;
24+
import org.apache.log4j.internal.annotation.SuppressFBWarnings;
2525

2626
/**
2727
* An extension of the Level class that provides support for java.util.logging Levels.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Log4j 1.x compatibility layer.
1919
*/
2020
@Export
21-
@Version("2.20.3")
21+
@Version("2.26.0")
2222
package org.apache.log4j.helpers;
2323

2424
import org.osgi.annotation.bundle.Export;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to you under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.log4j.internal.annotation;
18+
19+
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
21+
22+
/**
23+
* Annotation to suppress Spotbugs warnings.
24+
*/
25+
@Retention(RetentionPolicy.CLASS)
26+
public @interface SuppressFBWarnings {
27+
28+
String[] value() default {};
29+
30+
String justification() default "";
31+
}

0 commit comments

Comments
 (0)