sizovs / PipelinR

PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your Java awesome app.
https://github.com/sizovs/PipelinR
MIT License
420 stars 59 forks source link

Why Voidy instead of java.lang.Void #10

Closed rdehuyss closed 5 years ago

rdehuyss commented 5 years ago

Hi guys,

why did you introduce Voidy? java.lang.Void also exists which would fit the use case exactly.

Cheers, R

sizovs commented 5 years ago

Hi @rdehuyss

This is because we want to make client's code NPE-safe and respect NullAway rules. Since java.lang.Void cannot be instantiated, a developer is forced to return null from the command that returns Void. We want to avoid this with a custom null object Voidy.