eclipse-ee4j / eclipse-ee4j/jersey

Add 'strictMatching' property to InjectLink annotation to allow lenient strategy

Open
#3,248 6 comments 0 reactions 0 assignees View on GitHub
Component: extensions Priority: Major pull-request Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

Although it is now possible to avoid to define all bindings and get data from the uri, it fails if the query parameters are defined in the Resource but are not available in the uri, which often happens since query parameters are most of the time optional.
Unfortunately, the code in ELLinkBuilder doesn't allow simply to separate path and query parameters in the template.
We then propose to add a 'strictMatching' flag to deactivate the PropertyNotFoundException that is typically thrown, and instead allow to pass a null value to the uriBuilder.
By default, strictMatching is true to keep compatibility with current behavior
#### Affected Versions
[2.22]

Contributor guide

Open the contributing guide

Research direction

Start by reading the InjectLink annotation and ELLinkBuilder, then trace where PropertyNotFoundException is raised while building URIs. Done means adding a strictMatching option that defaults to true while allowing missing query parameters to produce null values in lenient mode; verify the existing strict behavior remains compatible.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.