Skip to content

Commit 786a717

Browse files
fix: java 8 incompatibility (#165)
* Re-add java 8 to test matrix * Replace Map.entry() * Formatting
1 parent 329a069 commit 786a717

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
java: [ "11", "17", "21" ]
15+
java: [ "8", "11", "17", "21" ]
1616
distribution: [ "zulu", "adopt" ]
1717

1818
steps:

src/main/java/com/flagsmith/utils/ModelUtils.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.flagsmith.flagengine.identities.traits.TraitModel;
44
import com.flagsmith.models.SdkTraitModel;
55
import com.flagsmith.models.TraitConfig;
6+
import java.util.AbstractMap;
67
import java.util.List;
78
import java.util.Map;
89
import java.util.Map.Entry;
@@ -46,12 +47,8 @@ private static Stream<Entry<String, TraitConfig>> getTraitConfigStreamFromTraitM
4647
Map<String, Object> traits
4748
) {
4849
return traits.entrySet().stream().map(
49-
(row) -> {
50-
return Map.entry(
51-
row.getKey(),
52-
TraitConfig.fromObject(row.getValue())
53-
);
54-
}
50+
row -> new AbstractMap.SimpleEntry<>(
51+
row.getKey(), TraitConfig.fromObject(row.getValue()))
5552
);
5653
}
5754

0 commit comments

Comments
 (0)