From 0f3b2fe877c42a72ebaffd543e0a2021378a55f0 Mon Sep 17 00:00:00 2001 From: DarkAtra Date: Sat, 17 Oct 2026 16:27:33 +0200 Subject: [PATCH 1/3] fix(gh-1330): allow reading kotlin collection types by default --- CHANGELOG.md | 8 +++ .../no2/mvstore/FilteredObjectDataType.java | 54 ++++++++++++++-- .../no2/mvstore/MVStoreModuleBuilder.java | 5 +- .../dizitart/no2/mvstore/NitriteMVStore.java | 19 ++++++ .../SerialFilterRejectedException.java | 43 +++++++++++++ .../compat/v1/NitriteObjectInputStream.java | 8 +-- .../no2/mvstore/SerialFilterTest.java | 31 +++++++++ .../dizitart/kno2/KotlinCollectionsTest.kt | 64 +++++++++++++++++++ 8 files changed, 221 insertions(+), 11 deletions(-) create mode 100644 nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/SerialFilterRejectedException.java create mode 100644 potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinCollectionsTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f9fa037..5005730d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## Unreleased + +### Issue Fixes + +- **Kotlin stdlib collections are readable again after upgrading to 5.4.0** ([#1330](https://github.com/nitrite/nitrite-java/issues/1330)) + - The MVStore deserialization allowlist added in 5.4.0 covered only `org.dizitart.no2.**;java.**`, so a document written by a Kotlin app holding `emptyList()`, `emptySet()` or `emptyMap()` - stored as `kotlin.collections.EmptyList`, `EmptySet` and `EmptyMap` - could no longer be read. `kotlin.collections.**` is now allowed by default, in the store filter and in the v1 migration filter. + - **A class refused by the filter is no longer treated as file corruption.** `NitriteMVStore.openMVMap` used to roll the store back one version per failed attempt, discarding committed data and ending in `Chunk N not found`, which hid the real cause. It now fails at once with a `NitriteSecurityException` that names the rejected class and points to `MVStoreModuleBuilder.allowedClasses(...)`, and leaves the file untouched. + ## Release 5.4.0 - Oct 5, 2026 Eleven changes from [@brettwooldridge](https://github.com/brettwooldridge), most of them found on a production system, and one H2 workaround found while testing them. Four are data-integrity fixes, three of which can end with a store that will not reopen or a query that quietly returns the wrong rows. diff --git a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/FilteredObjectDataType.java b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/FilteredObjectDataType.java index c60acb12..5a402d24 100644 --- a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/FilteredObjectDataType.java +++ b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/FilteredObjectDataType.java @@ -40,7 +40,9 @@ class FilteredObjectDataType extends ObjectDataType { private static final int TYPE_SERIALIZED_OBJECT = 19; private static final int LAST_PRIMITIVE_CLASS_ID = 7; - private static final String DEFAULT_ALLOWED = "org.dizitart.no2.**;java.**"; + // kotlin.collections covers the serializable kotlin stdlib collections (EmptyList, + // EmptySet, EmptyMap, builders) stored by kotlin apps through emptyList() and friends + private static final String DEFAULT_ALLOWED = "org.dizitart.no2.**;java.**;kotlin.collections.**"; private final ObjectInputFilter filter; @@ -49,7 +51,7 @@ class FilteredObjectDataType extends ObjectDataType { } /** - * Builds the filter allowing nitrite's own and JDK types, plus the given + * Builds the filter allowing nitrite's own, JDK and kotlin collection types, plus the given * JEP 290 patterns; a process-wide filter, if set, can still reject. */ static ObjectInputFilter createFilter(String allowedClasses) { @@ -78,19 +80,61 @@ public Object read(ByteBuffer buff) { // ObjectDataType; nitrite never stores one, so refuse it int classId = buff.get(buff.position() + 1); if (classId < 0 || classId > LAST_PRIMITIVE_CLASS_ID) { - throw DataUtils.newMVStoreException(ERROR_SERIALIZATION, - "Object arrays are not allowed in a nitrite map"); + throw new SerialFilterRejectedException("Object arrays are not allowed in a nitrite map"); } } return super.read(buff); } private Object readFiltered(byte[] data) { + RejectionRecorder recorder = new RejectionRecorder(filter); try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(data))) { - in.setObjectInputFilter(filter); + in.setObjectInputFilter(recorder); return in.readObject(); } catch (Exception e) { + if (recorder.rejected) { + throw new SerialFilterRejectedException(rejectionMessage(recorder.rejectedClass), e); + } throw DataUtils.newMVStoreException(ERROR_SERIALIZATION, "Could not deserialize {0}", e, e); } } + + private static String rejectionMessage(Class rejectedClass) { + if (rejectedClass == null) { + return "A stored object exceeds the limits of the deserialization filter"; + } + while (rejectedClass.isArray()) { + rejectedClass = rejectedClass.getComponentType(); + } + String className = rejectedClass.getName(); + String packageName = rejectedClass.getPackage() == null ? "" : rejectedClass.getPackage().getName(); + String example = packageName.isEmpty() ? className : packageName + ".**"; + return "Class " + className + " is not allowed to be deserialized from the database. " + + "If it is trusted, allow it with MVStoreModuleBuilder.allowedClasses(...), " + + "e.g. allowedClasses(\"" + example + "\")"; + } + + /** + * Delegates to the configured filter and remembers what it rejected, so the + * resulting error can name the class instead of a bare "filter status: REJECTED". + */ + private static class RejectionRecorder implements ObjectInputFilter { + private final ObjectInputFilter delegate; + private boolean rejected; + private Class rejectedClass; + + RejectionRecorder(ObjectInputFilter delegate) { + this.delegate = delegate; + } + + @Override + public Status checkInput(FilterInfo info) { + Status status = delegate.checkInput(info); + if (status == Status.REJECTED && !rejected) { + rejected = true; + rejectedClass = info.serialClass(); + } + return status; + } + } } diff --git a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/MVStoreModuleBuilder.java b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/MVStoreModuleBuilder.java index afd48aea..64f6f489 100644 --- a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/MVStoreModuleBuilder.java +++ b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/MVStoreModuleBuilder.java @@ -124,8 +124,9 @@ public class MVStoreModuleBuilder { /** * Extra JEP 290 patterns (for example {@code com.example.model.**}) of - * classes allowed to be deserialized from the store, besides nitrite's own - * and JDK types. Needed only when documents hold values of other + * classes allowed to be deserialized from the store, besides nitrite's own, + * JDK and kotlin collection ({@code kotlin.collections.**}) types. Needed + * only when documents hold values of other * {@link java.io.Serializable} classes. */ private String allowedClasses; diff --git a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/NitriteMVStore.java b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/NitriteMVStore.java index c601a483..3c886051 100644 --- a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/NitriteMVStore.java +++ b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/NitriteMVStore.java @@ -30,6 +30,7 @@ import org.dizitart.no2.common.util.StringUtils; import org.dizitart.no2.exceptions.NitriteIOException; +import org.dizitart.no2.exceptions.NitriteSecurityException; import org.dizitart.no2.index.BoundingBox; import org.dizitart.no2.store.AbstractNitriteStore; import org.dizitart.no2.store.NitriteMap; @@ -318,6 +319,13 @@ private MVMap openMVMap(String mapName, MVMap.MapBuilder builder) { enableAutoCommitIfPending(); return map; } catch (MVStoreException me) { + SerialFilterRejectedException rejection = findRejection(me); + if (rejection != null) { + // the data is intact, only not allowed to be read; rolling back to + // an earlier version would discard committed data and hide the cause + throw new NitriteSecurityException("Unable to open map " + mapName + ": " + + rejection.getMessage(), rejection); + } if (version == 0) { throw me; } @@ -335,10 +343,21 @@ private MVMap openMVMap(String mapName, MVMap.MapBuilder builder) { exception = me; } } + } catch (NitriteSecurityException e) { + throw e; } catch (Exception e) { exception = e; } throw new NitriteIOException("Unable to open map " + mapName, exception); } + + private static SerialFilterRejectedException findRejection(Throwable error) { + for (Throwable t = error; t != null; t = t.getCause()) { + if (t instanceof SerialFilterRejectedException) { + return (SerialFilterRejectedException) t; + } + } + return null; + } } diff --git a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/SerialFilterRejectedException.java b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/SerialFilterRejectedException.java new file mode 100644 index 00000000..dae2c46f --- /dev/null +++ b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/SerialFilterRejectedException.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017-2021 Nitrite author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.dizitart.no2.mvstore; + +import org.h2.mvstore.MVStoreException; + +import static org.h2.mvstore.DataUtils.ERROR_SERIALIZATION; + +/** + * Thrown when a stored object is refused by the deserialization allowlist of + * {@link FilteredObjectDataType}. Unlike other serialization errors this is not + * a sign of a corrupt file, so the store must not roll back on it. It extends + * {@link MVStoreException} so that h2 passes it through instead of reporting + * the page as corrupt. + * + * @since 5.4.1 + */ +class SerialFilterRejectedException extends MVStoreException { + private static final long serialVersionUID = 1762953123L; + + SerialFilterRejectedException(String message) { + super(ERROR_SERIALIZATION, message); + } + + SerialFilterRejectedException(String message, Throwable cause) { + this(message); + initCause(cause); + } +} diff --git a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/NitriteObjectInputStream.java b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/NitriteObjectInputStream.java index d52caab2..cd6d3dfa 100644 --- a/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/NitriteObjectInputStream.java +++ b/nitrite-mvstore-adapter/src/main/java/org/dizitart/no2/mvstore/compat/v1/NitriteObjectInputStream.java @@ -36,12 +36,12 @@ public class NitriteObjectInputStream extends ObjectInputStream { /** * Allowlist filter for the legacy v1 migration path (CWE-502). Only Nitrite's - * own (compat) types and standard JDK types may be deserialized; any other - * class - e.g. a third-party gadget on the classpath - is rejected. See - * GHSA-9297-g93h-86gg. + * own (compat) types, standard JDK types and kotlin stdlib collections may be + * deserialized; any other class - e.g. a third-party gadget on the classpath - + * is rejected. See GHSA-9297-g93h-86gg. */ static final ObjectInputFilter SERIAL_FILTER = ObjectInputFilter.Config.createFilter( - "maxdepth=32;org.dizitart.no2.**;java.**;!*"); + "maxdepth=32;org.dizitart.no2.**;java.**;kotlin.collections.**;!*"); static { migrationMap.put("org.dizitart.no2.Security$UserCredential", Compat.UserCredential.class); diff --git a/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/mvstore/SerialFilterTest.java b/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/mvstore/SerialFilterTest.java index 7c82edad..dda7cee9 100644 --- a/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/mvstore/SerialFilterTest.java +++ b/nitrite-mvstore-adapter/src/test/java/org/dizitart/no2/mvstore/SerialFilterTest.java @@ -64,6 +64,37 @@ public void rejectsGadgetInObjectArray() { assertFalse("gadget readObject() must not run", EvilGadget.readObjectCalled); } + @Test + public void rejectionNamesClassAndKeepsData() { + try (Nitrite db = open(null)) { + db.getCollection("notes").insert(Document.createDocument("payload", new EvilGadget())); + } + + try (Nitrite db = open(null)) { + db.getCollection("notes").find().toList(); + fail("expected the gadget to be rejected"); + } catch (Exception expected) { + String message = messages(expected); + assertTrue(message, message.contains(EvilGadget.class.getName())); + assertTrue(message, message.contains("allowedClasses")); + } + + // a rejected class is not corruption: the store must not have been rolled back + try (Nitrite db = open("com.evil.*")) { + NitriteCollection notes = db.getCollection("notes"); + assertEquals(1, notes.size()); + assertTrue(notes.find().firstOrNull().get("payload") instanceof EvilGadget); + } + } + + private static String messages(Throwable error) { + StringBuilder builder = new StringBuilder(); + for (Throwable t = error; t != null; t = t.getCause()) { + builder.append(t.getMessage()).append('\n'); + } + return builder.toString(); + } + @Test public void allowsConfiguredClasses() { try (Nitrite db = open(null)) { diff --git a/potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinCollectionsTest.kt b/potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinCollectionsTest.kt new file mode 100644 index 00000000..bfa4d2e7 --- /dev/null +++ b/potassium-nitrite/src/test/kotlin/org/dizitart/kno2/KotlinCollectionsTest.kt @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2017-2020. Nitrite author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.dizitart.kno2 + +import org.dizitart.no2.mvstore.MVStoreModule +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Test + +/** + * Kotlin stdlib collections stored in a document must be readable after + * reopening the database with the default deserialization filter (#1330). + */ +class KotlinCollectionsTest : BaseTest() { + + @Test + fun testReadKotlinCollectionsAfterReopen() { + db = nitrite { + loadModule(MVStoreModule(fileName)) + loadModule(KNO2Module()) + } + db!!.getCollection("test") { + insert( + documentOf( + "key" to 1, + "emptyList" to emptyList(), + "emptySet" to emptySet(), + "emptyMap" to emptyMap(), + "nested" to listOf>(emptyList(), emptySet()), + ) + ) + } + db!!.close() + + db = nitrite { + loadModule(MVStoreModule(fileName)) + loadModule(KNO2Module()) + } + db!!.getCollection("test") { + val doc = find().firstOrNull() + assertNotNull(doc) + assertEquals(1, doc!!["key"]) + assertEquals(emptyList(), doc["emptyList"]) + assertEquals(emptySet(), doc["emptySet"]) + assertEquals(emptyMap(), doc["emptyMap"]) + assertEquals(listOf>(emptyList(), emptySet()), doc["nested"]) + } + db!!.close() + } +} From 0c60792d63119a25158d5a765082446791083c18 Mon Sep 17 00:00:00 2001 From: DarkAtra Date: Sat, 17 Oct 2026 16:39:24 +0200 Subject: [PATCH 2/3] chore: add tests for graalvm --- .../nitrite/test/DatabaseTestUtils.java | 9 +- .../test/serialization/SerialFilterTest.java | 84 +++++++++++++++++++ .../serialization/model/UntrustedPayload.java | 21 +++++ .../serialization-config.json | 6 ++ 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/SerialFilterTest.java create mode 100644 nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/model/UntrustedPayload.java diff --git a/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/DatabaseTestUtils.java b/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/DatabaseTestUtils.java index 9faa3b0b..2246b460 100644 --- a/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/DatabaseTestUtils.java +++ b/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/DatabaseTestUtils.java @@ -3,6 +3,7 @@ import org.dizitart.nitrite.test.repository.PersonEntityConverter; import org.dizitart.no2.Nitrite; import org.dizitart.no2.mvstore.MVStoreModule; +import org.jspecify.annotations.Nullable; import java.io.IOException; import java.io.InputStream; @@ -26,7 +27,7 @@ public static Nitrite setupDatabase() throws IOException { return setupDatabase(null); } - public static Nitrite setupDatabase(final URL template) throws IOException { + public static Nitrite setupDatabase(@Nullable final URL template) throws IOException { final Path databasePath = getRandomDatabasePath(); @@ -37,8 +38,14 @@ public static Nitrite setupDatabase(final URL template) throws IOException { } } + return openDatabase(databasePath, null); + } + + public static Nitrite openDatabase(final Path databasePath, @Nullable final String allowedClasses) { + final MVStoreModule mvStoreModule = MVStoreModule.withConfig() .filePath(databasePath.toFile()) + .allowedClasses(allowedClasses) .build(); return Nitrite.builder() diff --git a/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/SerialFilterTest.java b/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/SerialFilterTest.java new file mode 100644 index 00000000..1da8ac97 --- /dev/null +++ b/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/SerialFilterTest.java @@ -0,0 +1,84 @@ +package org.dizitart.nitrite.test.serialization; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import org.dizitart.nitrite.test.DatabaseTestUtils; +import org.dizitart.nitrite.test.serialization.model.UntrustedPayload; +import org.dizitart.no2.Nitrite; +import org.dizitart.no2.collection.Document; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; + +public class SerialFilterTest { + + private static final String ALLOWED_CLASSES = "org.dizitart.nitrite.test.serialization.model.*"; + + @Test + void rejectedClassShouldBeReportedWithoutRollback() throws IOException { + + final Path databasePath = DatabaseTestUtils.getRandomDatabasePath(); + + try (final Nitrite database = DatabaseTestUtils.openDatabase(databasePath, null)) { + // requires additional serialization hints for UntrustedPayload + // see: src/test/resources/META-INF/native-image/org.dizitart/nitrite-native-tests/serialization-config.json + database.getCollection("test").insert(Document.createDocument() + .put("payload", new UntrustedPayload("test"))); + } + + // the error message is built from the rejected class (name and package), + // which has to work in native image as well + try (final Nitrite database = DatabaseTestUtils.openDatabase(databasePath, null)) { + assertThatThrownBy(() -> database.getCollection("test").find().toList()) + .hasStackTraceContaining("Class " + UntrustedPayload.class.getName() + " is not allowed") + .hasStackTraceContaining("allowedClasses(\"org.dizitart.nitrite.test.serialization.model.**\")"); + } + + // a rejected class is no corruption, so the committed data must still be there + try (final Nitrite database = DatabaseTestUtils.openDatabase(databasePath, ALLOWED_CLASSES)) { + + final var testCollection = database.getCollection("test"); + + assertThat(testCollection.size()).isEqualTo(1); + final Document document = testCollection.find().firstOrNull(); + assertThat(document).isNotNull(); + assertThat(document.get("payload", UntrustedPayload.class).getValue()).isEqualTo("test"); + } + } + + @Test + void rejectedArrayShouldBeReportedByComponentType() throws IOException { + + final Path databasePath = DatabaseTestUtils.getRandomDatabasePath(); + + try (final Nitrite database = DatabaseTestUtils.openDatabase(databasePath, null)) { + // object arrays are only stored through java serialization when nested, e.g. in a list + final List payloads = new ArrayList<>(); + payloads.add(new UntrustedPayload[]{new UntrustedPayload("test")}); + database.getCollection("test").insert(Document.createDocument() + .put("payloads", payloads)); + } + + // the message has to name the component type instead of the array type + try (final Nitrite database = DatabaseTestUtils.openDatabase(databasePath, null)) { + assertThatThrownBy(() -> database.getCollection("test").find().toList()) + .hasStackTraceContaining("Class " + UntrustedPayload.class.getName() + " is not allowed") + .hasStackTraceContaining("allowedClasses(\"org.dizitart.nitrite.test.serialization.model.**\")"); + } + + try (final Nitrite database = DatabaseTestUtils.openDatabase(databasePath, ALLOWED_CLASSES)) { + + final Document document = database.getCollection("test").find().firstOrNull(); + + assertThat(document).isNotNull(); + final List payloads = document.get("payloads", List.class); + assertThat(payloads).hasSize(1); + final UntrustedPayload[] array = (UntrustedPayload[]) payloads.get(0); + assertThat(array).hasSize(1); + assertThat(array[0].getValue()).isEqualTo("test"); + } + } +} diff --git a/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/model/UntrustedPayload.java b/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/model/UntrustedPayload.java new file mode 100644 index 00000000..5c95fc82 --- /dev/null +++ b/nitrite-native-tests/src/test/java/org/dizitart/nitrite/test/serialization/model/UntrustedPayload.java @@ -0,0 +1,21 @@ +package org.dizitart.nitrite.test.serialization.model; + +import java.io.Serializable; + +/** + * A {@link Serializable} type outside of the default deserialization allowlist. + */ +public class UntrustedPayload implements Serializable { + + private static final long serialVersionUID = 1L; + + private final String value; + + public UntrustedPayload(final String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/nitrite-native-tests/src/test/resources/META-INF/native-image/org.dizitart/nitrite-native-tests/serialization-config.json b/nitrite-native-tests/src/test/resources/META-INF/native-image/org.dizitart/nitrite-native-tests/serialization-config.json index 344f9fc7..f60a63df 100644 --- a/nitrite-native-tests/src/test/resources/META-INF/native-image/org.dizitart/nitrite-native-tests/serialization-config.json +++ b/nitrite-native-tests/src/test/resources/META-INF/native-image/org.dizitart/nitrite-native-tests/serialization-config.json @@ -7,5 +7,11 @@ }, { "name": "java.math.BigInteger" + }, + { + "name": "org.dizitart.nitrite.test.serialization.model.UntrustedPayload" + }, + { + "name": "[Lorg.dizitart.nitrite.test.serialization.model.UntrustedPayload;" } ] From fe46fe7a2692e7a2ae7cb567d1371e8877df58c3 Mon Sep 17 00:00:00 2001 From: DarkAtra Date: Sat, 17 Oct 2026 16:47:09 +0200 Subject: [PATCH 3/3] chore: add some more tests for graalvm --- .github/workflows/build.yml | 2 +- nitrite-native-tests/pom.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cf80d34..afaddc99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,7 +93,7 @@ jobs: strategy: matrix: os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ] - java: [ '17', '21' ] + java: [ '17', '21', '25' ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v7 diff --git a/nitrite-native-tests/pom.xml b/nitrite-native-tests/pom.xml index 5daa7cbb..d0cac1b1 100644 --- a/nitrite-native-tests/pom.xml +++ b/nitrite-native-tests/pom.xml @@ -122,6 +122,9 @@ true ${project.build.outputDirectory} + --initialize-at-run-time=org.junit.jupiter.engine.discovery.MethodSegmentResolver