• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / valkyrja-java / 30235881102
100%

Build:
DEFAULT BRANCH: 26.x
Ran 27 Jul 2026 04:00AM UTC
Jobs 1
Files 653
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Jul 2026 03:58AM UTC coverage: 99.977%. Remained the same
30235881102

push

github

web-flow
[Http] Fix dynamic route matching and annotation parameter modifiers (#48)

# Description

While adding routing combination tests to mirror the PHP reference PRs
(valkyrjaio/valkyrja-php#923, #924), two real bugs surfaced in the Java
HTTP routing
port — both masked by 100% coverage because the existing tests never
connected the pieces
end to end.

**1. Dynamic route matching never worked.** The `Processor` wrapped
every dynamic route's
regex in `Regex.START` / `Regex.END`, which were the PHP reference's
PCRE delimiters
(`/^` … `$/`). Java's `java.util.regex.Pattern` uses no delimiters, so
the stored regex
(also what Sindri writes into the generated cache) had literal `/`
characters at both ends
and could never match. The existing `MatcherTest` masked this by
hand-writing
delimiter-free Java regexes and never using `Processor` output;
`ProcessorTest` only
checked the regex was non-empty. Fix: `Regex.START`/`END` are now the
Java-native anchors
`^` / `$`, so the `Processor` produces (and the cache stores) a valid
Java regex from the
start — no PHP delimiters, no conversion. This is Java, not PHP.

**2. Annotation parameter modifiers were dropped.**
`AttributeRouteCollector` converted
`@Parameter` annotations (both inline in `@DynamicRoute(parameters=…)`
and method-level)
using only `name` + `regex`, silently discarding `isOptional` and
`shouldCapture`. A route
declaring `@Parameter(shouldCapture = false)` still produced a capturing
group. Fix: a
shared `annotationToDataParameter` helper now preserves all flags,
consistent with
`convertToDataParameter`.

Each fix ships with the tests that prove it (and would have caught it):
exact-regex
production matrices, an end-to-end match matrix (per-type valid/invalid,
request-method
filtering, trailing slash, static-over-dynamic precedence,
multi-parameter extraction,
non-capturing binding), and an attribute-path regex matrix asserting
annotations produce
the same regex as direct construction.

Sibling of the PHP ... (continued)

1844 of 1846 branches covered (99.89%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 1 file covered. (100.0%)

6755 of 6755 relevant lines covered (100.0%)

4.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30235881102.1 27 Jul 2026 04:00AM UTC 653
99.98
GitHub Action Run
Source Files on build 30235881102
  • Tree
  • List 653
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30235881102
  • 972e6730 on github
  • Prev Build on 26.x (#30235742201)
  • Next Build on 26.x (#30236270400)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc