This is an automated email from the ASF dual-hosted git repository.

mattsicker pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 5e6f5781d623f68cf84a2a274aa9a95d3a14539c
Author: Matt Sicker <[email protected]>
AuthorDate: Mon Jan 1 18:10:05 2024 -0600

    Remove unused annotations
    
    To be replaced by JSpecify.
---
 .../apache/logging/log4j/lang/CheckForNull.java    | 40 ---------------------
 .../log4j/lang/ElementsAreNotNullByDefault.java    | 31 ----------------
 .../org/apache/logging/log4j/lang/NotNull.java     | 39 --------------------
 .../org/apache/logging/log4j/lang/Tainted.java     | 41 ----------------------
 .../org/apache/logging/log4j/lang/Untainted.java   | 40 ---------------------
 .../apache/logging/log4j/lang/package-info.java    | 28 ---------------
 6 files changed, 219 deletions(-)

diff --git 
a/log4j-api/src/main/java/org/apache/logging/log4j/lang/CheckForNull.java 
b/log4j-api/src/main/java/org/apache/logging/log4j/lang/CheckForNull.java
deleted file mode 100644
index 21e8a5ab3e..0000000000
--- a/log4j-api/src/main/java/org/apache/logging/log4j/lang/CheckForNull.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.logging.log4j.lang;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-import javax.annotation.Nonnull;
-import javax.annotation.meta.TypeQualifierNickname;
-import javax.annotation.meta.When;
-
-/**
- * Annotates an element that may be null.
- */
-@Documented
-@Target({
-    ElementType.FIELD,
-    ElementType.METHOD,
-    ElementType.PARAMETER,
-    ElementType.TYPE_PARAMETER,
-    ElementType.LOCAL_VARIABLE,
-    ElementType.TYPE_USE
-})
-@Nonnull(when = When.MAYBE)
-@TypeQualifierNickname
-public @interface CheckForNull {}
diff --git 
a/log4j-api/src/main/java/org/apache/logging/log4j/lang/ElementsAreNotNullByDefault.java
 
b/log4j-api/src/main/java/org/apache/logging/log4j/lang/ElementsAreNotNullByDefault.java
deleted file mode 100644
index 54d8efdbc4..0000000000
--- 
a/log4j-api/src/main/java/org/apache/logging/log4j/lang/ElementsAreNotNullByDefault.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.logging.log4j.lang;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import javax.annotation.Nonnull;
-import javax.annotation.meta.TypeQualifierDefault;
-
-/**
- * Annotates an element to indicate all its members should never be null. When 
applied to a package, this applies
- * to all classes in the package.
- */
-@Documented
-@TypeQualifierDefault({ElementType.FIELD, ElementType.METHOD, 
ElementType.PARAMETER})
-@Nonnull
-public @interface ElementsAreNotNullByDefault {}
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/lang/NotNull.java 
b/log4j-api/src/main/java/org/apache/logging/log4j/lang/NotNull.java
deleted file mode 100644
index 8735658a70..0000000000
--- a/log4j-api/src/main/java/org/apache/logging/log4j/lang/NotNull.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.logging.log4j.lang;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-import javax.annotation.Nonnull;
-import javax.annotation.meta.TypeQualifierNickname;
-
-/**
- * Annotates an element that should never be null.
- */
-@Documented
-@Target({
-    ElementType.FIELD,
-    ElementType.METHOD,
-    ElementType.PARAMETER,
-    ElementType.TYPE_PARAMETER,
-    ElementType.LOCAL_VARIABLE,
-    ElementType.TYPE_USE
-})
-@TypeQualifierNickname
-@Nonnull
-public @interface NotNull {}
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/lang/Tainted.java 
b/log4j-api/src/main/java/org/apache/logging/log4j/lang/Tainted.java
deleted file mode 100644
index 787d1c6cf5..0000000000
--- a/log4j-api/src/main/java/org/apache/logging/log4j/lang/Tainted.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.logging.log4j.lang;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-import javax.annotation.meta.TypeQualifierNickname;
-import javax.annotation.meta.When;
-
-/**
- * Annotates an element that is tainted (possibly untrusted or unvalidated 
input).
- *
- * @see Untainted
- */
-@Documented
-@Target({
-    ElementType.FIELD,
-    ElementType.METHOD,
-    ElementType.PARAMETER,
-    ElementType.TYPE_PARAMETER,
-    ElementType.LOCAL_VARIABLE,
-    ElementType.TYPE_USE
-})
-@TypeQualifierNickname
[email protected](when = When.MAYBE)
-public @interface Tainted {}
diff --git 
a/log4j-api/src/main/java/org/apache/logging/log4j/lang/Untainted.java 
b/log4j-api/src/main/java/org/apache/logging/log4j/lang/Untainted.java
deleted file mode 100644
index 7fed3ba68f..0000000000
--- a/log4j-api/src/main/java/org/apache/logging/log4j/lang/Untainted.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.logging.log4j.lang;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-import javax.annotation.meta.TypeQualifierNickname;
-
-/**
- * Annotates an element that is untainted (properly validated or escaped).
- *
- * @see Tainted
- */
-@Documented
-@Target({
-    ElementType.FIELD,
-    ElementType.METHOD,
-    ElementType.PARAMETER,
-    ElementType.TYPE_PARAMETER,
-    ElementType.LOCAL_VARIABLE,
-    ElementType.TYPE_USE
-})
-@TypeQualifierNickname
[email protected]
-public @interface Untainted {}
diff --git 
a/log4j-api/src/main/java/org/apache/logging/log4j/lang/package-info.java 
b/log4j-api/src/main/java/org/apache/logging/log4j/lang/package-info.java
deleted file mode 100644
index cb8eea6faf..0000000000
--- a/log4j-api/src/main/java/org/apache/logging/log4j/lang/package-info.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-
-/**
- * Provides essential type checking annotations for use with tools like 
SpotBugs. To avoid runtime issues with
- * optionally-available annotations, annotations are defined in this package, 
and annotation-related reflection
- * can easily skip over these annotations.
- */
-@Export
-@Version("3.0.0")
-package org.apache.logging.log4j.lang;
-
-import org.osgi.annotation.bundle.Export;
-import org.osgi.annotation.versioning.Version;

Reply via email to