More more more more more more more more more more more more more more more more more work
This commit is contained in:
parent
011df7dc84
commit
dabbf5b193
374 changed files with 427 additions and 472 deletions
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Git information to version command/on startup
|
|||
|
||||
diff --git a/src/main/java/io/papermc/paper/util/JarManifests.java b/src/main/java/io/papermc/paper/util/JarManifests.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..cfd5fa044f58c8a5493f8efc08280b22c401a1da
|
||||
index 0000000000000000000000000000000000000000..2b06b17e20826fb95c9ad58101b4102308ea4b29
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/util/JarManifests.java
|
||||
@@ -0,0 +1,32 @@
|
||||
@@ -0,0 +1,34 @@
|
||||
+package io.papermc.paper.util;
|
||||
+
|
||||
+import java.io.IOException;
|
||||
|
@ -18,8 +18,10 @@ index 0000000000000000000000000000000000000000..cfd5fa044f58c8a5493f8efc08280b22
|
|||
+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..cfd5fa044f58c8a5493f8efc08280b22
|
|||
+
|
||||
+ 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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue