[MDSAL-806] Add Augmentable.augmentationOrElseThrow() Created: 16/Jan/23 Updated: 24/Jan/23 Resolved: 24/Jan/23 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding Spec |
| Affects Version/s: | None |
| Fix Version/s: | 10.0.7, 11.0.5 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
A number of of users assume or require an augmentation to be present. Unfortunately this ends up being rather verbose and there is no @NonNull-returning method. As a first step add augmentationOrElseThrows() methods, which throw either a NoSuchElementException or an exception returned by a Supplier. |