More more more more more more more more more more more more more more more more more work

This commit is contained in:
Nassim Jahnke
2021-11-25 10:19:05 +01:00
parent 8c6927e39d
commit a39e11bdf3
12 changed files with 875 additions and 84 deletions

View File

@@ -18,8 +18,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.jar.Manifest;
+import org.checkerframework.checker.nullness.qual.Nullable;
+
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+@ApiStatus.Internal
+public final class JarManifests {
@@ -28,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ private static final Map<ClassLoader, Manifest> MANIFESTS = Collections.synchronizedMap(new WeakHashMap<>());
+
+ public static Manifest manifest(final ClassLoader loader) {
+ public static @NotNull Manifest manifest(final @NotNull ClassLoader loader) {
+ return MANIFESTS.computeIfAbsent(loader, classLoader -> {
+ final @Nullable InputStream stream = classLoader.getResourceAsStream("META-INF/MANIFEST.MF");
+ if (stream == null) {