mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-27 14:22:55 +00:00
Improvement: Use deterministic UUIDs for generated inner class names.
This commit is contained in:
1 parent
33705b8c97
commit
495f177f3d
1 file changed
+3
-1
@@ -25,6 +25,7 @@
|
||||
package org.spongepowered.asm.mixin.transformer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@@ -426,7 +427,8 @@ final class InnerClassGenerator implements IClassGenerator {
|
||||
if (name.matches("^[0-9]+$")) {
|
||||
name = "Anonymous";
|
||||
}
|
||||
return String.format("%s$%s$%s", targetClass, name, UUID.randomUUID().toString().replace("-", ""));
|
||||
UUID uuid = UUID.nameUUIDFromBytes(originalName.getBytes(StandardCharsets.UTF_8));
|
||||
return String.format("%s$%s$%s", targetClass, name, uuid.toString().replace("-", ""));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user