Skip to content

Remove retrolambda and custom functional interfaces in favour of java.util.function#2693

Open
Copilot wants to merge 2 commits intomasterfrom
copilot/remove-retrolamba-custom-interfaces
Open

Remove retrolambda and custom functional interfaces in favour of java.util.function#2693
Copilot wants to merge 2 commits intomasterfrom
copilot/remove-retrolamba-custom-interfaces

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

Now that the engine targets Java 8+, the retrolambda backport plugin and the hand-rolled functional interfaces in com.jme3.util.functional are no longer needed.

Deleted

  • com.jme3.util.functional.Function<R,T>java.util.function.Function<T,R> (note reversed type-param order)
  • com.jme3.util.functional.NoArgFunction<R>java.util.function.Supplier<R>
  • com.jme3.util.functional.NoArgVoidFunctionjava.lang.Runnable
  • com.jme3.util.functional.VoidFunction<T>java.util.function.Consumer<T>

Updated — BufferLayout.java

The only in-tree consumer of the custom interfaces. Function<Boolean, Object> (a predicate by usage) is replaced with java.util.function.Predicate<Object>:

// Before
private Function<Boolean, Object> filter;
public ObjectSerializer(Function<Boolean, Object> filter) { … }
return filter.eval(obj);

// After
private Predicate<Object> filter;
public ObjectSerializer(Predicate<Object> filter) { … }
return filter.test(obj);

Build

  • Removed classpath libs.gradle.retrolambda, apply plugin: 'me.tatarka.retrolambda', and the retrolambda { … } configuration block from build.gradle.
  • Removed the gradle-retrolambda entry from gradle/libs.versions.toml.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 7, 2026 that may be closed by this pull request
@riccardobl riccardobl added the Refactoring and Cleanup This PR is all about improving code quality and javadoc. label Apr 7, 2026
@riccardobl riccardobl marked this pull request as ready for review April 7, 2026 10:12
Copilot AI changed the title [WIP] Remove retrolamba and custom functional interfaces Remove retrolambda and custom functional interfaces in favour of java.util.function Apr 7, 2026
Copilot AI requested a review from riccardobl April 7, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactoring and Cleanup This PR is all about improving code quality and javadoc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove retrolamba and custom functional interfaces

2 participants