Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Feature: support Optional<T> for DS service reference type #38

Open
bjhargrave opened this issue Sep 10, 2018 · 3 comments
Open

Feature: support Optional<T> for DS service reference type #38

bjhargrave opened this issue Sep 10, 2018 · 3 comments
Labels
publiccomment Public comment

Comments

@bjhargrave
Copy link
Member

Original bug ID: BZ#226
From: Neil Bartlett <neil.bartlett@paremus.com>
Reported version: R7

@bjhargrave
Copy link
Member Author

Comment author: Neil Bartlett <neil.bartlett@paremus.com>

As a minor feature request for the next DS version, it would useful to allow Optional as a supported field/parameter type for an optional service reference. For example:

@ Reference
Optional<LogService> optLog;

It could be inferred from the type that the reference has cardinality 0..1 rather than 1..1. When the service is unavailable, the field would be bound to Optional.empty rather than null.

@bjhargrave
Copy link
Member Author

Comment author: Toni Menzel <toni.menzel@rebaze.com>

This is actually a very good idea.
Any official opinion/feedback on Neils request?
Toni

@bjhargrave
Copy link
Member Author

Comment author: Castro B <castro8583bennett@gmx.com>

This would be GREAT! user friendly.

Castro B,
http://internetvergelijken.nl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
publiccomment Public comment
Projects
None yet
Development

No branches or pull requests

1 participant