Skip to content

Towards17#438

Merged
rgoers merged 19 commits into
trunkfrom
towards17
May 30, 2026
Merged

Towards17#438
rgoers merged 19 commits into
trunkfrom
towards17

Conversation

@rgoers
Copy link
Copy Markdown
Member

@rgoers rgoers commented May 30, 2026

Makes Flume buildable in Java 17.

rgoers and others added 15 commits May 29, 2026 08:59
While #431 migrated `RegexExtractorInterceptorMillisSerializer` correctly from Joda to Java time, it introduced a small bug in the tests, which assume that all dates are in `UTC`.

The original extractor interpreted them instead in the local timezone.
While #431 migrated `RegexExtractorInterceptorMillisSerializer` correctly from Joda to Java time, it introduced a small bug in the tests, which assume that all dates are in `UTC`.

The original extractor interpreted them instead in the local timezone.
Modifies the regex in SyslogUtils to allow up to 9 digits of precision in timestamps.

This level of precision does not exist on Java 8, but since Java 9 nanosecond precision is available at least on Linux.
With the old Mockito `TestMultiportSyslogTCPSource` worked, because Mockito was unable to mock final methods and the real methods were called.

Now Mockito inline is able to mock final methods and operations essential for the test fail.
When properties are defined in terms of each other, e.g. `a = ${b}` with `b = OK`, `MapResolver#resolveProperties` filled the result map while using that same map as the lookup source, so a reference only resolved when the referenced property had already been evaluated. As the iteration order of `Properties#stringPropertyNames` is unspecified, properties like `a` were sometimes left unresolved.

Pre-seed the map with the raw values so that every key is visible to the lookup regardless of evaluation order.

`TestMapResolver` covers both reference orderings, and documents that self-referencing and cyclic definitions are left to Commons Text's recursion guard, which either returns the literal or throws `IllegalStateException`.
@rgoers rgoers requested a review from ppkarwasz May 30, 2026 18:57
Copy link
Copy Markdown
Member

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rgoers rgoers merged commit a6fe173 into trunk May 30, 2026
4 checks passed
@rgoers rgoers deleted the towards17 branch May 30, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants