Skip to content

Commit c1c540d

Browse files
Copilotriccardobl
andauthored
Remove retrolambda and custom functional interfaces in favour of java.util.function (#2693)
* Initial plan * Remove retrolambda and custom functional interfaces, use java.util.function Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/cb42d986-3665-4a49-adf0-eb4a85119711 Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
1 parent eb34d93 commit c1c540d

File tree

7 files changed

+5
-159
lines changed

7 files changed

+5
-159
lines changed

build.gradle

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ buildscript {
1111
}
1212
dependencies {
1313
classpath libs.android.build.gradle
14-
classpath libs.gradle.retrolambda
1514
classpath libs.spotbugs.gradle.plugin
1615
}
1716
}
@@ -33,8 +32,6 @@ apply plugin: 'base'
3332
apply plugin: 'com.github.spotbugs'
3433
apply from: file('version.gradle')
3534

36-
apply plugin: 'me.tatarka.retrolambda'
37-
3835
// This is applied to all sub projects
3936
subprojects {
4037
if(!project.name.equals('jme3-android-examples')) {
@@ -245,10 +242,4 @@ if (skipPrebuildLibraries != "true" && buildNativeProjects != "true") {
245242

246243
assemble.dependsOn extractPrebuiltNatives
247244
}
248-
}
249-
250-
retrolambda {
251-
javaVersion JavaVersion.VERSION_1_7
252-
incremental true
253-
jvmArgs '-noverify'
254-
}
245+
}

gradle/libs.versions.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ androidx-lifecycle-common = "androidx.lifecycle:lifecycle-common:2.7.0"
1313
android-build-gradle = "com.android.tools.build:gradle:9.1.0"
1414
android-support-appcompat = "com.android.support:appcompat-v7:28.0.0"
1515
gradle-git = "org.ajoberstar:gradle-git:1.2.0"
16-
gradle-retrolambda = "me.tatarka:gradle-retrolambda:3.7.1"
1716
groovy-test = "org.codehaus.groovy:groovy-test:3.0.24"
1817
gson = "com.google.code.gson:gson:2.13.2"
1918
j-ogg-vorbis = "com.github.stephengold:j-ogg-vorbis:1.0.6"

jme3-core/src/main/java/com/jme3/shader/bufferobject/layout/BufferLayout.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.util.List;
3737

3838
import com.jme3.math.FastMath;
39-
import com.jme3.util.functional.Function;
39+
import java.util.function.Predicate;
4040

4141
/**
4242
* Layout serializer for buffers
@@ -46,7 +46,7 @@
4646
public abstract class BufferLayout {
4747

4848
public static abstract class ObjectSerializer<T> {
49-
private Function<Boolean, Object> filter;
49+
private Predicate<Object> filter;
5050

5151
public ObjectSerializer(Class<T> cls) {
5252
this(obj -> {
@@ -56,12 +56,12 @@ public ObjectSerializer(Class<T> cls) {
5656

5757
}
5858

59-
public ObjectSerializer(Function<Boolean, Object> filter) {
59+
public ObjectSerializer(Predicate<Object> filter) {
6060
this.filter = filter;
6161
}
6262

6363
public final boolean canSerialize(Object obj) {
64-
return filter.eval(obj);
64+
return filter.test(obj);
6565
}
6666

6767
public abstract int length(BufferLayout layout, T obj);

jme3-core/src/main/java/com/jme3/util/functional/Function.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

jme3-core/src/main/java/com/jme3/util/functional/NoArgFunction.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

jme3-core/src/main/java/com/jme3/util/functional/NoArgVoidFunction.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

jme3-core/src/main/java/com/jme3/util/functional/VoidFunction.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)