RFR: 8336332: Rework tests to avoid unrelated stderr output [v7]

Kevin Rushforth kcr at openjdk.org
Thu Sep 18 17:54:42 UTC 2025


On Thu, 18 Sep 2025 16:27:14 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> modules/javafx.base/src/test/java/test/javafx/util/OutputRedirect.java line 141:
>> 
>>> 139: 
>>> 140:     private static Map<String, Integer> toMap(Object... expected) {
>>> 141:         HashMap<String, Integer> m = new HashMap<>();
>> 
>> Suggestion: Given how they are used, you might consider using a `Set` (which could be created as either a `LinkedHashSet` or `TreeSet`) instead. This would simplify the logic a bit.
>
> No, I need the counts.
> JDK has neither `MultiMap`s nor counting sets.

Oh, nm. I missed that the value is a count of that particular exception class.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1897#discussion_r2360430587


More information about the openjfx-dev mailing list