fix occasional issue with cell reuse when avoiding updating cells during table size estimation
What changed, and why it matters
This is a user-interface bug fix in a Bitcoin wallet app. It changes how a table cell decides to skip its own refresh, so that it only skips during JavaFX's internal table-size recalculation and not in other situations. The previous shortcut could occasionally leave a reused cell showing stale or wrong information. There is no indication this is a security vulnerability or that it could be exploited to steal funds or data.
Treat as a routine UI bug fix. No security response required. If triaging, verify that the stale-cell-reuse scenario cannot cause users to confirm transactions based on incorrect displayed data; the diff itself does not suggest such a risk.
Security signals we found
No security-relevant signals in commit title or message
No mention of vulnerability, CVE, exploit, attacker model, or disclosure
Change is confined to JavaFX TableCell rendering logic
No input validation, cryptography, network, or privilege changes
Evidence from the diff
EntryCell.updateItem() previously returned early whenever the same last cell was being updated while its TableRow was not visible. This optimization was intended to avoid CPU work during JavaFX VirtualFlow size estimation (JDK-8280442 / JDK-8265669). The patch narrows the shortcut by adding isTableSizeRecalculation(), which uses StackWalker to verify the caller is VirtualFlow.releaseCell(). This prevents false positives where legitimate cell reuse with invisible rows would skip updates and leave stale content. The change is defensive UI correctness, not a security boundary fix.
Changed components
src/main/java/com/sparrowwallet/sparrow/control/EntryCell.javaInspect captured patch +8 / −1
diff --git a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java
index 7df648a..4a7224a 100644
--- a/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java
+++ b/src/main/java/com/sparrowwallet/sparrow/control/EntryCell.java
@@ -57,7 +57,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
super.updateItem(entry, empty);
//Return immediately to avoid CPU usage when updating the same invisible cell to determine tableview size (see https://bugs.openjdk.org/browse/JDK-8280442)
- if(this == lastCell && !getTableRow().isVisible()) {
+ if(this == lastCell && !getTableRow().isVisible() && isTableSizeRecalculation()) {
return;
}
lastCell = this;
@@ -856,4 +856,11 @@ public class EntryCell extends TreeTableCell<Entry, Entry> implements Confirmati
}
}
}
+
+ private boolean isTableSizeRecalculation() {
+ //As per https://bugs.openjdk.org/browse/JDK-8265669 we check for cell visibility to avoid unnecessary recalculation, but this can result in false positives
+ //The method releaseCell in VirtualFlow is responsible for setting accumCell visibility to false after use, so check this method is calling updateItem
+ return StackWalker.getInstance().walk(frames -> frames.anyMatch(frame -> frame.getClassName().equals("javafx.scene.control.skin.VirtualFlow")
+ && frame.getMethodName().equals("releaseCell")));
+ }
}
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.