mirror of
https://github.com/PaperMC/Velocity
synced 2026-08-18 22:23:06 -04:00
Bump lmbda to 3.0.0, defining generated handlers with the proxy's lookup instead of the plugin's
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Reapplies the lmbda 3.0.0 bump reverted in f918d0d6.
This commit is contained in:
parent
f918d0d649
commit
4772ca3022
3 changed files with 3 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ kyori-ansi = "net.kyori:ansi:1.1.1"
|
|||
guava = "com.google.guava:guava:33.6.0-jre"
|
||||
gson = "com.google.code.gson:gson:2.14.0"
|
||||
guice = "com.google.inject:guice:7.0.0"
|
||||
lmbda = "org.lanternpowered:lmbda:2.0.0"
|
||||
lmbda = "org.lanternpowered:lmbda:3.0.0"
|
||||
log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" }
|
||||
log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
|
||||
log4j-slf4j-impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" }
|
||||
|
|
|
|||
|
|
@ -60,9 +60,7 @@ final class CustomHandlerAdapter<F> {
|
|||
UntargetedEventHandler buildUntargetedHandler(final Method method)
|
||||
throws IllegalAccessException {
|
||||
final MethodHandle methodHandle = methodHandlesLookup.unreflect(method);
|
||||
final MethodHandles.Lookup defineLookup = MethodHandles.privateLookupIn(
|
||||
method.getDeclaringClass(), methodHandlesLookup);
|
||||
final LambdaType<F> lambdaType = functionType.defineClassesWith(defineLookup);
|
||||
final LambdaType<F> lambdaType = functionType.defineClassesWith(methodHandlesLookup);
|
||||
final F invokeFunction = LambdaFactory.create(lambdaType, methodHandle);
|
||||
final BiFunction<Object, Object, EventTask> handlerFunction =
|
||||
handlerBuilder.apply(invokeFunction);
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ public class VelocityEventManager implements EventManager {
|
|||
} else {
|
||||
type = untargetedVoidHandlerType;
|
||||
}
|
||||
return LambdaFactory.create(type.defineClassesWith(lookup), methodHandle);
|
||||
return LambdaFactory.create(type.defineClassesWith(methodHandlesLookup), methodHandle);
|
||||
}
|
||||
|
||||
static final class MethodHandlerInfo {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue