Respect other Optional<T> types
See original GitHub issueIt’d be great if Optional<T>
types other than Guava and Java 8 would be accepted by Dagger 2. It’s costly to include all of Guava in an Android app, and using Java 8 APIs aren’t an option for many apps, due to only being available on API 24
+.
Happy for another alternative though - we just need working optional/nullable binding functionality.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Getting Respect from a Boss You Respect - Springer
Interpersonal respect can be differentiated into two kinds: (1) horizontal respect, i.e. treating someone with dignity; and (2) vertical ...
Read more >RAINN Uber
RAINN and Uber have teamed up to provide tips for the best ways to respect others while driving and riding with Uber. Working...
Read more >Teaching Kids Respect in the Classroom
Recognize students when they demonstrate kindness, good manners, empathy, and respect for others. This intentional acknowledgment leads to positive outcomes.
Read more >List of rules - Respect\Validation - Read the Docs
List of rules. Types. ArrayVal · ArrayType · BoolVal · BoolType · CallableType · Countable · Date · FalseVal · FloatVal · FloatType...
Read more >c++ - Do std::optional and boost::optional respect alignment ...
The contained value shall be allocated in a region of the optional storage suitably aligned for the type T. An implementor could use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
But there are cases when it makes sense: Guava is a big library and it’s doesn’t sound reasonable to include it just because of Optional even if you use ProGuard Java 8 Optional is not available on Android before API level 24 (pre-24 devices is about 70%)
I still like an idea about Optional factory, but maybe an alternative solution Dagger could provide own very simple Optional implementation for such cases as separate artifact or as part of runtime library (something like DaggerOptional or OptionalDependency)
One way would be: