On Thu, 5 Mar 2020 at 19:29, Gilles Sadowski wrote:
>
> Le jeu. 5 mars 2020 à 16:12, sebb a écrit :
> >
> > On Wed, 4 Mar 2020 at 14:20, Gilles Sadowski wrote:
> > >
> > > Le mer. 4 mars 2020 à 15:16, sebb a écrit :
> > > >
> > > > On Wed, 4 Mar 2020 at 14:09, Gary Gregory
> > > > wrote:
> >
Le jeu. 5 mars 2020 à 19:04, Peter Verhas a écrit :
>
> Just my 2c:
>
> When you have an assertion in the code that throws an exception, be it NPE
> or IAE then your code is less prone to errors during maintenance. In that
> case, the assertion is there is the code, kind of documenting it. If the
Le jeu. 5 mars 2020 à 16:12, sebb a écrit :
>
> On Wed, 4 Mar 2020 at 14:20, Gilles Sadowski wrote:
> >
> > Le mer. 4 mars 2020 à 15:16, sebb a écrit :
> > >
> > > On Wed, 4 Mar 2020 at 14:09, Gary Gregory wrote:
> > > >
> > > > IMO, until we are all on Java 14 and benefit from its more detaile
Just my 2c:
When you have an assertion in the code that throws an exception, be it NPE
or IAE then your code is less prone to errors during maintenance. In that
case, the assertion is there is the code, kind of documenting it. If the
assertion is not there with the reasoning that the subsequent co
On Wed, 4 Mar 2020 at 14:20, Gilles Sadowski wrote:
>
> Le mer. 4 mars 2020 à 15:16, sebb a écrit :
> >
> > On Wed, 4 Mar 2020 at 14:09, Gary Gregory wrote:
> > >
> > > IMO, until we are all on Java 14 and benefit from its more detailed NPE
> > > message, we need to call Validate.notNull _with a
Le mer. 4 mars 2020 à 15:16, Gilles Sadowski a écrit :
>
> Le mer. 4 mars 2020 à 15:09, Gary Gregory a écrit :
> >
> > IMO, until we are all on Java 14 and benefit from its more detailed NPE
> > message, we need to call Validate.notNull _with a message_ that says what
> > variable blew up.
>
> No
Le mer. 4 mars 2020 à 15:16, sebb a écrit :
>
> On Wed, 4 Mar 2020 at 14:09, Gary Gregory wrote:
> >
> > IMO, until we are all on Java 14 and benefit from its more detailed NPE
> > message, we need to call Validate.notNull _with a message_ that says what
> > variable blew up.
>
> +1
>
> That is a
On Wed, 4 Mar 2020 at 14:09, Gary Gregory wrote:
>
> IMO, until we are all on Java 14 and benefit from its more detailed NPE
> message, we need to call Validate.notNull _with a message_ that says what
> variable blew up.
+1
That is another good point.
Unless one has access to the exact same ver
Le mer. 4 mars 2020 à 15:09, Gary Gregory a écrit :
>
> IMO, until we are all on Java 14 and benefit from its more detailed NPE
> message, we need to call Validate.notNull _with a message_ that says what
> variable blew up.
No, we don't *need* to (for the reason stated previously), but you
may *w
IMO, until we are all on Java 14 and benefit from its more detailed NPE
message, we need to call Validate.notNull _with a message_ that says what
variable blew up.
Gary
On Wed, Mar 4, 2020 at 9:01 AM Gilles Sadowski wrote:
> Le mer. 4 mars 2020 à 14:19, Gary Gregory a
> écrit :
> >
> > On Wed,
Le mer. 4 mars 2020 à 14:19, Gary Gregory a écrit :
>
> On Wed, Mar 4, 2020 at 7:58 AM sebb wrote:
>
> > On Sat, 29 Feb 2020 at 18:09, Gilles Sadowski
> > wrote:
> > >
> > > Le sam. 29 févr. 2020 à 18:39, Gary Gregory a
> > écrit :
> > > >
> > > > On Sat, Feb 22, 2020 at 5:25 PM Gary Gregory
>
On Wed, Mar 4, 2020 at 7:58 AM sebb wrote:
> On Sat, 29 Feb 2020 at 18:09, Gilles Sadowski
> wrote:
> >
> > Le sam. 29 févr. 2020 à 18:39, Gary Gregory a
> écrit :
> > >
> > > On Sat, Feb 22, 2020 at 5:25 PM Gary Gregory
> wrote:
> > >
> > > > I would like to do the same in Lang as with Collec
On Sat, 29 Feb 2020 at 18:09, Gilles Sadowski wrote:
>
> Le sam. 29 févr. 2020 à 18:39, Gary Gregory a écrit :
> >
> > On Sat, Feb 22, 2020 at 5:25 PM Gary Gregory wrote:
> >
> > > I would like to do the same in Lang as with Collections (see below.)\
> > >
> > > We currently perform checks like:
Le sam. 29 févr. 2020 à 18:39, Gary Gregory a écrit :
>
> On Sat, Feb 22, 2020 at 5:25 PM Gary Gregory wrote:
>
> > I would like to do the same in Lang as with Collections (see below.)\
> >
> > We currently perform checks like:
> >
> > Validate.isTrue(foo != null, ...)
> >
> > Which should be IMO
On Sat, Feb 22, 2020 at 5:25 PM Gary Gregory wrote:
> I would like to do the same in Lang as with Collections (see below.)\
>
> We currently perform checks like:
>
> Validate.isTrue(foo != null, ...)
>
> Which should be IMO:
>
> Validate.notNull(foo, ...);
>
> The difference being that the former
I would like to do the same in Lang as with Collections (see below.)\
We currently perform checks like:
Validate.isTrue(foo != null, ...)
Which should be IMO:
Validate.notNull(foo, ...);
The difference being that the former throws IAE and the later NPE.
As with [collections], my argument is t
16 matches
Mail list logo