jakartaee / jakartaee/cdi

Provide shortcut for CDI.current().select(xxx.class).get()

Open
#684 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
240
Forks
83
PR merge metrics
No merged PRs in 30d

Description

Would be great to have a shortcut for CDI.current().select(xxx.class).get().

My proposal would be: CDI.get(xxx.class).

I have several hundreds of such calls in my code. Such as shortcut would make the code more concise and thus better readable.

Thanks for consideration.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the CDI.current().select(xxx.class).get() usage described in the issue and the existing discussion. Determine whether CDI.get(xxx.class) should provide equivalent behavior; done means the proposed shortcut is specified and its API implications are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.