Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ public static void write(Path target, SettingsSecurity configuration, boolean do
Path tempFile = parent.resolve(target.getFileName() + "."
+ Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp");

configuration.setModelVersion(specVersion());
// always set manually as some features don't require changes in the underlying model but still require
// adjustments of either minor or major version of the JAR
configuration.setModelVersion("4.0");
configuration.setModelEncoding(StandardCharsets.UTF_8.name());

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void readWrite() throws IOException {
Path path = Path.of("./target/sec.xml");
SettingsSecurity config = SecUtil.read(path);
assertNotNull(config);
assertEquals(SecUtil.specVersion(), config.getModelVersion());
assertEquals("4.0", config.getModelVersion());
assertEquals(StandardCharsets.UTF_8.name(), config.getModelEncoding());
assertEquals("magic:mighty", config.getDefaultDispatcher());
SecUtil.write(path, config, false);
Expand All @@ -79,7 +79,7 @@ void readWriteWithBackup() throws IOException {
Path path = Path.of("./target/sec.xml");
SettingsSecurity config = SecUtil.read(path);
assertNotNull(config);
assertEquals(SecUtil.specVersion(), config.getModelVersion());
assertEquals("4.0", config.getModelVersion());
assertEquals(StandardCharsets.UTF_8.name(), config.getModelEncoding());
assertEquals("magic:mighty", config.getDefaultDispatcher());
SecUtil.write(path, config, true);
Expand Down
Loading