Skip to content

Commit 25a17cd

Browse files
Run jpro-platform on JavaFX 25.0.2 + jfx-25-sandec; add failing routing TextFlow leak test
The TextFlow-removed-children leak reproduces on JavaFX 25 headless rendering. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 58db7f9 commit 25a17cd

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
JPRO_VERSION = 2026.2.0
3-
JAVAFX_BUILD_VERSION = 17.0.18
3+
JAVAFX_BUILD_VERSION = 25.0.2
44
JAVAFX_EXAMPLES_VERSION = 23.0.2
55
JAVAFX_25_VERSION = 25.0.2
66
SIMPLEFX_VERSION = 3.3.3
@@ -34,7 +34,7 @@ ASSERTJ_VERSION = 3.27.7
3434
HAMCREST_VERSION = 3.0
3535
MOCKITO_VERSION = 5.21.0
3636
TESTFX_VERSION = 4.0.18-jpms
37-
MONOCLE_VERSION = jfx-21-sandec
37+
MONOCLE_VERSION = jfx-25-sandec
3838
SLF4J_API_VERSION = 2.0.17
3939
LOGBACK_VERSION = 1.5.32
4040

jpro-routing/core-test/src/test/scala/one/jpro/platform/routing/crawl/TestMemoryTester.scala

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,25 @@ class TestMemoryTester {
5151
}
5252

5353

54+
// Mirrors jpro-website CheckForLeaks.routeWithLeaf: same shape, only the "/x" leaf differs.
55+
private def routeWithLeaf(leaf: () => javafx.scene.Node): () => Route = () =>
56+
Route.empty()
57+
.and(Route.get("/", r => {
58+
val link = new javafx.scene.control.Label("to x")
59+
one.jpro.platform.routing.LinkUtil.setLink(link, "/x", "desc")
60+
Response.node(new javafx.scene.layout.VBox(link))
61+
}))
62+
.and(Route.get("/x", r => Response.node(leaf())))
63+
64+
private def crawlAndCheck(route: () => Route): Unit = {
65+
val result = AppCrawler.crawlRoute("http://localhost", () => route())
66+
MemoryTester.testForLeaks(result, () => route())
67+
}
68+
69+
@Test
70+
def textFlowLeakTest(): Unit =
71+
crawlAndCheck(routeWithLeaf(() => new javafx.scene.text.TextFlow(new javafx.scene.text.Text("hello world"))))
72+
5473
@Test
5574
def simpleFailingTest3(): Unit = {
5675

0 commit comments

Comments
 (0)