[BUG] TimerAfterPredicateJudge inconsistent with TimerBeforePredicateJudge on empty paramName
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
## Description
`TimerBeforePredicateJudge` guards with `if (!StringUtils.hasLength(paramName))` (true for both `null` and `""`), falling back to `LocalDateTime.now()`. `TimerAfterPredicateJudge` guards with `if (Objects.isNull(paramName))` (true for `null` only). When `paramName` is an empty string (not null), `TimerAfter` skips the `now()` branch and calls `DateUtils.parseLocalDateTime(realData)`, where `realData` is built from the empty param name — throwing a date-parse exception.
## Location
```
shenyu-plugin-base/.../condition/judge/TimerAfterPredicateJudge.java:36
TimerBeforePredicateJudge.java:36
```
## Impact
A `TimerAfter` rule condition persisted with an empty-string `paramName` fails with an exception during request-time matching; the rule is effectively treated as not-matching, silently dropping traffic that should have been allowed after the configured time.
## Suggested fix
Make `TimerAfterPredicateJudge` use `if (!StringUtils.hasLength(paramName))` like `TimerBefore`.
## Related existing issue(s)
None
_Identified during the 2026-08-02 audit; full list in [`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.