From e1b3bca7c4bab5d2fdfb866bcf3b980ae28d387c Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Sat, 13 Feb 2021 19:58:45 -0800 Subject: [PATCH] Remove jandex as unused Quarkus requested our adoption and then reverted their usage, as it was determined to not be a good solution to their AOT problems with our runtime loading of generated classes. --- build.gradle | 1 - .../github/benmanes/caffeine/JandexTest.java | 49 ------------------- checksum.xml | 1 + gradle/codeQuality.gradle | 1 - gradle/dependencies.gradle | 4 -- .../benmanes/caffeine/guava/JandexTest.java | 42 ---------------- .../benmanes/caffeine/jcache/JandexTest.java | 42 ---------------- 7 files changed, 1 insertion(+), 139 deletions(-) delete mode 100644 caffeine/src/test/java/com/github/benmanes/caffeine/JandexTest.java delete mode 100644 guava/src/test/java/com/github/benmanes/caffeine/guava/JandexTest.java delete mode 100644 jcache/src/test/java/com/github/benmanes/caffeine/jcache/JandexTest.java diff --git a/build.gradle b/build.gradle index fad16f7223..425fbe0e97 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,6 @@ subprojects { dependencies { testImplementation libraries.guava - testImplementation libraries.jandex testImplementation testLibraries.mockito testImplementation testLibraries.hamcrest testImplementation testLibraries.awaitility diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/JandexTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/JandexTest.java deleted file mode 100644 index df29bb68ba..0000000000 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/JandexTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2020 Ben Manes. All Rights Reserved. - * - * Licensed 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 com.github.benmanes.caffeine; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Collection; - -import org.jboss.jandex.ClassInfo; -import org.jboss.jandex.DotName; -import org.jboss.jandex.Index; -import org.jboss.jandex.IndexReader; -import org.testng.annotations.Test; - -/** - * @author ben.manes@gmail.com (Ben Manes) - */ -public final class JandexTest { - - @Test - public void loadIndex() throws IOException { - try (InputStream input = getClass().getResourceAsStream("/META-INF/jandex.idx")) { - Index index = new IndexReader(input).read(); - assertThat(index.getKnownClasses(), is(not(empty()))); - - Collection caches = index.getAllKnownSubclasses(DotName.createSimple( - "com.github.benmanes.caffeine.cache.BoundedLocalCache")); - assertThat(caches, is(not(empty()))); - } - } -} diff --git a/checksum.xml b/checksum.xml index 47965412ef..fb94d9d04a 100644 --- a/checksum.xml +++ b/checksum.xml @@ -156,6 +156,7 @@ + diff --git a/gradle/codeQuality.gradle b/gradle/codeQuality.gradle index 83291bb160..1de22e6894 100644 --- a/gradle/codeQuality.gradle +++ b/gradle/codeQuality.gradle @@ -3,7 +3,6 @@ */ import static org.gradle.util.GradleVersion.version -apply plugin: 'org.kordamp.gradle.jandex' apply plugin: 'org.kordamp.gradle.stats' apply plugin: 'org.checkerframework' apply plugin: 'com.github.spotbugs' diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 1b07fff08e..66aada028c 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -45,7 +45,6 @@ ext { googleJavaFormat: '1.9', guava: '30.1-jre', jackrabbit: '1.38.0', - jandex: '2.2.3.Final', jamm: '0.3.3', javaObjectLayout: '0.14', javapoet: '1.13.0', @@ -88,7 +87,6 @@ ext { coveralls: '2.8.4', errorprone: '1.3.0', jacoco: '0.8.6', - jandex: '0.9.0', jmh: '0.5.3', jmhReport: '0.9.0', nexusPublish: '1.0.0', @@ -134,7 +132,6 @@ ext { jackrabbit: dependencies.create("org.apache.jackrabbit:oak-core:${versions.jackrabbit}") { exclude group: 'junit' }, - jandex: "org.jboss:jandex:${versions.jandex}", jamm: "com.github.jbellis:jamm:${versions.jamm}", javaObjectLayout: "org.openjdk.jol:jol-cli:${versions.javaObjectLayout}", javapoet: "com.squareup:javapoet:${versions.javapoet}", @@ -196,7 +193,6 @@ ext { }, coveralls: "gradle.plugin.com.github.kt3k.coveralls:coveralls-gradle-plugin:${pluginVersions.coveralls}", errorprone: "net.ltgt.gradle:gradle-errorprone-plugin:${pluginVersions.errorprone}", - jandex: "org.kordamp.gradle:jandex-gradle-plugin:${pluginVersions.jandex}", jmh: [ "me.champeau.gradle.jmh:me.champeau.gradle.jmh.gradle.plugin:${pluginVersions.jmh}", "org.openjdk.jmh:jmh-core:${versions.jmh}", diff --git a/guava/src/test/java/com/github/benmanes/caffeine/guava/JandexTest.java b/guava/src/test/java/com/github/benmanes/caffeine/guava/JandexTest.java deleted file mode 100644 index a8d8dc2d2e..0000000000 --- a/guava/src/test/java/com/github/benmanes/caffeine/guava/JandexTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 Ben Manes. All Rights Reserved. - * - * Licensed 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 com.github.benmanes.caffeine.guava; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; - -import java.io.IOException; -import java.io.InputStream; - -import org.jboss.jandex.Index; -import org.jboss.jandex.IndexReader; -import org.junit.Test; - -/** - * @author ben.manes@gmail.com (Ben Manes) - */ -public final class JandexTest { - - @Test - public void loadIndex() throws IOException { - try (InputStream input = getClass().getResourceAsStream("/META-INF/jandex.idx")) { - Index index = new IndexReader(input).read(); - assertThat(index.getKnownClasses(), is(not(empty()))); - } - } -} diff --git a/jcache/src/test/java/com/github/benmanes/caffeine/jcache/JandexTest.java b/jcache/src/test/java/com/github/benmanes/caffeine/jcache/JandexTest.java deleted file mode 100644 index a83202c7d0..0000000000 --- a/jcache/src/test/java/com/github/benmanes/caffeine/jcache/JandexTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 Ben Manes. All Rights Reserved. - * - * Licensed 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 com.github.benmanes.caffeine.jcache; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; - -import java.io.IOException; -import java.io.InputStream; - -import org.jboss.jandex.Index; -import org.jboss.jandex.IndexReader; -import org.testng.annotations.Test; - -/** - * @author ben.manes@gmail.com (Ben Manes) - */ -public final class JandexTest { - - @Test - public void loadIndex() throws IOException { - try (InputStream input = getClass().getResourceAsStream("/META-INF/jandex.idx")) { - Index index = new IndexReader(input).read(); - assertThat(index.getKnownClasses(), is(not(empty()))); - } - } -}