mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
More more more more more more more more more more more more more more more more more work
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user