What’s New in tinystruct 1.7.38
This document highlights the changes introduced in tinystruct version 1.7.38, a reliability, performance, and security release featuring ASM CVE patches, JSON Builder/Builders round-trip fixes, faster lock-file I/O with configurable lock timeouts, default file logging, and synchronized updates across server and ecosystem modules.
See also: What’s New in 1.7.37 for the previous release featuring static file serving access control and path traversal mitigation.
Highlights of 1.7.38
- Security & Dependency Upgrades: Pinned
org.ow2.asmartifacts (asm,asm-commons,asm-analysis,asm-tree,asm-util) to9.11.1to resolve CVEs pulled in transitively vianashorn-core, and upgradedreactor-core(3.8.8) andsqlite-jdbc(3.54.1.0). - JSON Round-Trip & Escaping Fixes:
Buildernow escapes object keys on output and keeps lookalike strings quoted, whileBuildersfixes escaped backslashes, unescapes array strings, and preservesBoolean/nullliterals in arrays. - Faster Lock-File I/O & Configurable Timeouts:
Watcherscans.lockslots in a single read and writes slots directly, cutting stale-lock contention; addeddistributed.lock.timeoutanddistributed.lock.file.timeoutsettings (5000ms default). - Concurrency, Logging & App Lifecycle:
DistributedMessageQueue.take()releases its lock between polls to prevent worker starvation,LogFormatteruses thread-safeDateTimeFormatter,ApplicationManager.uninstall()removes all matching actions, andApplication.setAction(String, String)is undeprecated for dynamic routing. - File Logging Enabled by Default: Default
application.propertiesenablesjava.util.logging.FileHandleralongsideConsoleHandler(logs/tinystruct-%g.log, 5 rotating 10 MB files). - Ecosystem & Server Modules Updated: Updated
tinystruct-netty-http-server(1.1.12),tinystruct-tomcat-server(1.1.12),tinystruct-undertow-server(1.1.3),tinystruct-workflow(1.0.3), andtinystruct-typesafe(1.0.1).
Details
1. Security & Dependency Upgrades
Managed and direct dependencies updated in pom.xml:
| Dependency | Old | New | Notes |
|---|---|---|---|
org.ow2.asm:asm* (asm, -commons, -analysis, -tree, -util) |
7.3.1 (transitive via nashorn-core 15.7) |
9.11.1 |
Pinned via ${asm.version}; fixes CVE-2026-110257/58/60/61/63 and CVE-2026-110591 |
io.projectreactor:reactor-core |
3.6.18 |
3.8.8 |
Managed transitive vulnerability update |
org.xerial:sqlite-jdbc |
3.53.4.0 |
3.54.1.0 |
SQLite JDBC driver update |
Tip: If your project also imports ASM or Reactor directly, align those versions with the managed versions above.
2. JSON Builder / Builders Round-Trip & Escaping Fixes
JSON parsing and serialization in org.tinystruct.data.component.Builder and Builders now preserve structure, escaping, and primitive types across parse/serialize round trips:
- Escaped Object Keys: Object keys are escaped with
StringUtilities.escape(...)ontoString(), matching parser unescaping for quotes, backslashes, and control characters (e.g.,"C:\\dir"and"say \"hi\""). - Lookalike Strings Stay Strings: Single-value
Builderinstances store and emit strings as quoted JSON strings rather than re-parsing"true","false","null", or"123"as unquoted literals or numbers. - Native Array Literals & Unescaping:
Buildersparses unquotedtrue,false, andnullarray elements asBooleanornull(Builder.ofNull()) instead of strings, properly handles escaped backslashes before closing quotes, and unescapes parsed array strings.
// Mixed literals and lookalike strings preserve types across parse -> toString()
String json = "[true,false,null,1,\"true\",\"1\"]";
Builders array = new Builders();
array.parse(json);
assert json.equals(array.toString());
// Keys containing quotes, backslashes, or newlines round-trip cleanly
Builder obj = new Builder().put("C:\\dir\\", "v");
Builder reparsed = new Builder();
reparsed.parse(obj.toString());
assert "v".equals(reparsed.get("C:\\dir\\"));
3. Lock-File I/O Performance & Configurable Timeouts
Concurrent workloads using DistributedHashMap and Watcher benefit from lower lock-file overhead and tunable timeouts:
- Single-Read
.lockScanning:Watchernow reads the.lockfile in oneFileChannelread, scans slot records in memory, and writes updated flags directly instead of per-slot small reads—cutting median lock/unlock cycles on a stale90-slot file from15.5 msto6.4 ms. The on-disk format (36-byte lock ID +8-byte flag per slot) is unchanged and backward-compatible. - Configurable Lock Timeouts: Both lock waits (previously hardcoded to
5000ms) are now configurable inapplication.propertiesviaLockSettings. Missing, non-numeric, or non-positive values log a warning and fall back to5000ms.
# Lock timeouts in milliseconds (default: 5000)
distributed.lock.timeout=5000
distributed.lock.file.timeout=5000
- Explicit Per-Map Timeout Constructor:
DistributedHashMapaddsnew DistributedHashMap(dataFilePath, lockTimeoutMs)for programmatic control.
4. Concurrency, Logging & Application Lifecycle Improvements
- Queue Lock Starvation Fix:
DistributedMessageQueue.take(String)now releases its lock between1ms poll intervals so backgroundcopy()workers are never starved waiting to enqueue incoming messages, and returns"{}"immediately for unregistered session IDs. - Thread-Safe
LogFormatter: Replaced the mutableSimpleDateFormatinstance field inLogFormatterwith a static thread-safeDateTimeFormatter. - Default File Logging Enabled: Default
application.propertiesnow activates both console and rotating file logging:
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
ApplicationManager& Dynamic Action Registration:ApplicationManager.uninstall(Application)now removes all matching actions belonging to an application rather than returning after the first match.ApplicationManager.init()always marksinitialized = trueeven whendefault.import.applicationsis empty.Application.setAction(String, String)is no longer deprecated (@Deprecatedremoved), supporting dynamic route registration cleanly.
5. Server & Companion Ecosystem Modules Updated
All tinystruct HTTP server modules and companion libraries have been released against tinystruct 1.7.38 with updated dependencies:
| Module | Version | tinystruct Version | Highlights |
|---|---|---|---|
tinystruct-netty-http-server |
1.1.12 | 1.7.38 |
Aligned with 1.7.38; upgrades Netty to 4.2.20.Final and netty-tcnative to 2.0.85.Final. |
tinystruct-tomcat-server |
1.1.12 | 1.7.38 |
Aligned with 1.7.38 alongside embedded Tomcat 11.0.27 and jakarta.servlet-api 6.1.0. |
tinystruct-undertow-server |
1.1.3 | 1.7.38 |
Aligned with 1.7.38 alongside Undertow 2.4.4.Final, XNIO 3.8.17.Final, and jboss-logging 3.6.3.Final. |
tinystruct-workflow |
1.0.3 | 1.7.38 |
Aligned with 1.7.38; upgrades Lettuce to 7.9.0.RELEASE and updates Maven build plugins. |
tinystruct-typesafe |
1.0.1 | 1.7.38 |
Natural-language @Action dispatcher aligned with tinystruct 1.7.38 and tinystruct-workflow 1.0.3; upgrades Lettuce (7.9.0.RELEASE), adds semantic/pending listing (PendingSummary) and expired confirmation sweeper. |
Migration Guide
Updating to 1.7.38
Update your pom.xml dependency:
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct</artifactId>
<version>1.7.38</version>
</dependency>
Update companion modules if your project uses them:
<!-- HTTP Server Modules -->
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct-netty-http-server</artifactId>
<version>1.1.12</version>
</dependency>
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct-tomcat-server</artifactId>
<version>1.1.12</version>
</dependency>
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct-undertow-server</artifactId>
<version>1.1.3</version>
</dependency>
<!-- Workflow Engine -->
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct-workflow</artifactId>
<version>1.0.3</version>
</dependency>
<!-- TypeSafe Semantic Dispatcher -->
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct-typesafe-core</artifactId>
<version>1.0.1</version>
</dependency>
Things to Check When Upgrading from 1.7.37
BuildersArray Literal Types: Unquotedtrue,false, andnullelements inside JSON arrays now yieldBooleanornullfromBuilder.getValue()instead ofString. Quoted values ("true","null") remainString.- Default File Logging: Because the bundled
application.propertiesnow enablesjava.util.logging.FileHandlerby default, applications create rotating logs underlogs/tinystruct-%g.log. Overridehandlers = java.util.logging.ConsoleHandlerin your ownapplication.propertiesif console-only logging is preferred. - Distributed Lock Timeouts: Configure
distributed.lock.timeoutordistributed.lock.file.timeout(milliseconds) inapplication.propertiesif your environment requires values other than5000.
Community and Resources
- GitHub Repository: https://github.com/tinystruct/tinystruct
- Official Documentation: https://tinystruct.org
- Examples: https://github.com/tinystruct/tinystruct-examples
- Project Archetype: https://github.com/tinystruct/tinystruct-archetype