Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions BungeeCord-Patches/0010-Optimize-uuid-conversions.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 89ccd74999f91c9f795e60c083017a1dc74c3e02 Mon Sep 17 00:00:00 2001
From 852b9a521e5d663cf4c687b6d80fa320bad97f90 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Mon, 14 Mar 2016 15:40:44 -0700
Subject: [PATCH] Optimize uuid conversions
Expand All @@ -8,7 +8,7 @@ Manually decode uuids to and from hex.

diff --git a/api/src/main/java/io/github/waterfallmc/waterfall/utils/Hex.java b/api/src/main/java/io/github/waterfallmc/waterfall/utils/Hex.java
new file mode 100644
index 00000000..ece5f798
index 00000000..4a169ebc
--- /dev/null
+++ b/api/src/main/java/io/github/waterfallmc/waterfall/utils/Hex.java
@@ -0,0 +1,113 @@
Expand Down Expand Up @@ -51,7 +51,7 @@ index 00000000..ece5f798
+
+ public static void decode(CharSequence chars, int charOffset, byte[] dest, int offset, int length) {
+ Objects.requireNonNull(chars, "Null chars");
+ Objects.requireNonNull(chars, "Null destination");
+ Objects.requireNonNull(dest, "Null destination");
+ final int numChars = chars.length();
+ if ((numChars & 0x01) != 0) {
+ throw new IllegalArgumentException("Odd number of characters: " + numChars);
Expand Down Expand Up @@ -79,7 +79,7 @@ index 00000000..ece5f798
+
+ public static void encode(char[] chars, int charOffset, byte[] source, int offset, int length) {
+ Objects.requireNonNull(chars, "Null chars");
+ Objects.requireNonNull(chars, "Null bytes");
+ Objects.requireNonNull(source, "Null bytes");
+ if (offset < 0 || charOffset < 0 || length < 0 || length * 2 > chars.length - charOffset || length > source.length - offset) {
+ throw new IndexOutOfBoundsException();
+ } else if (length == 0) {
Expand Down Expand Up @@ -125,7 +125,6 @@ index 00000000..ece5f798
+ return ENCODE_TABLE[b];
+ }
+}
\ No newline at end of file
diff --git a/api/src/main/java/io/github/waterfallmc/waterfall/utils/UUIDUtils.java b/api/src/main/java/io/github/waterfallmc/waterfall/utils/UUIDUtils.java
new file mode 100644
index 00000000..cc24dd35
Expand Down Expand Up @@ -264,5 +263,5 @@ index 89f2d9fe..c254379a 100644

@Override
--
2.33.0
2.34.0