Skip to content

Commit

Permalink
Revert JEP 443-style unnamed params to fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jwharm committed Nov 10, 2023
1 parent 2dc66a1 commit b9a1474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class JavaClosure extends Closure {
*/
public JavaClosure(Runnable callback) {
super(Closure.simple((int) Closure.getMemoryLayout().byteSize(), null).handle());
setMarshal((_, _, _, _, _) -> callback.run());
setMarshal((closure, returnValue, paramValues, hint, data) -> callback.run());
}

/**
Expand All @@ -53,7 +53,7 @@ public JavaClosure(Runnable callback) {
*/
public JavaClosure(BooleanSupplier callback) {
super(Closure.simple((int) Closure.getMemoryLayout().byteSize(), null).handle());
setMarshal((_, returnValue, _, _, _) -> {
setMarshal((closure, returnValue, paramValues, hint, data) -> {
if (returnValue != null)
returnValue.setBoolean(callback.getAsBoolean());
});
Expand Down Expand Up @@ -114,7 +114,7 @@ public static Method getSingleMethod(Class<?> functionalInterfaceClass) throws I
*/
public JavaClosure(Object instance, Method method) {
super(Closure.simple((int) Closure.getMemoryLayout().byteSize(), null).handle());
setMarshal((_, returnValue, paramValues, _, _) -> {
setMarshal((closure, returnValue, paramValues, hint, data) -> {
try {
Object[] parameterObjects;
if (paramValues == null || paramValues.length == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public static <T extends GObject, TC extends GObject.ObjectClass> Consumer<TC> i
}
// Return class initializer method that installs the properties.
return (gclass) -> {
gclass.overrideGetProperty(Arena.global(), (object, propertyId, value, _) -> {
gclass.overrideGetProperty(Arena.global(), (object, propertyId, value, pspec) -> {
if (propertyId < 1 || propertyId >= getters.length) {
GLib.log(LOG_DOMAIN, LogLevelFlags.LEVEL_CRITICAL,
"Invalid property id %d in %s.getProperty\n",
Expand Down Expand Up @@ -385,7 +385,7 @@ public static <T extends GObject, TC extends GObject.ObjectClass> Consumer<TC> i
}
});

gclass.overrideSetProperty(Arena.global(), (object, propertyId, value, _) -> {
gclass.overrideSetProperty(Arena.global(), (object, propertyId, value, pspec) -> {
if (propertyId < 1 || propertyId >= setters.length) {
GLib.log(LOG_DOMAIN, LogLevelFlags.LEVEL_CRITICAL,
"Invalid property id %d in %s.setProperty\n",
Expand Down

0 comments on commit b9a1474

Please sign in to comment.