diff --git a/java/src/org/openqa/selenium/bidi/ConverterFunctions.java b/java/src/org/openqa/selenium/bidi/ConverterFunctions.java index ead6dae8ec249..14bb26d8eb0b2 100644 --- a/java/src/org/openqa/selenium/bidi/ConverterFunctions.java +++ b/java/src/org/openqa/selenium/bidi/ConverterFunctions.java @@ -49,14 +49,4 @@ public static Function map(final String keyName, Type typeOfX) return value; }; } - - public static Function empty() { - return input -> { - // expects an empty object - input.beginObject(); - input.endObject(); - - return null; - }; - } } diff --git a/java/src/org/openqa/selenium/devtools/CdpClientGenerator.java b/java/src/org/openqa/selenium/devtools/CdpClientGenerator.java index 34721c9d71dff..d1d65c7c3910c 100644 --- a/java/src/org/openqa/selenium/devtools/CdpClientGenerator.java +++ b/java/src/org/openqa/selenium/devtools/CdpClientGenerator.java @@ -437,7 +437,7 @@ public BodyDeclaration toMethodDeclaration() { .get() .addStatement( String.format( - "return new Event<>(\"%s.%s\", input -> ConverterFunctions.empty());", + "return new Event<>(\"%s.%s\", ConverterFunctions.empty());", domain.name, name)); } else if (type instanceof ObjectType || type instanceof ArrayType) { methodDecl diff --git a/java/src/org/openqa/selenium/devtools/ConverterFunctions.java b/java/src/org/openqa/selenium/devtools/ConverterFunctions.java index ec2ea04ff2eea..251ed7bda1435 100644 --- a/java/src/org/openqa/selenium/devtools/ConverterFunctions.java +++ b/java/src/org/openqa/selenium/devtools/ConverterFunctions.java @@ -45,4 +45,14 @@ public static Function map(final String keyName, Type typeOfX) return value; }; } + + public static Function empty() { + return input -> { + // expects an empty object + input.beginObject(); + input.endObject(); + + return null; + }; + } }