RE: @Nonnull?
For Maven, I think you can find these annotations here: javax.annotation javax.annotation-api 1.3.2 From: Owen Thomas Sent: Friday, June 25, 2021 10:22 AM To: NetBeans Mailing List Subject: Re: @Nonnull? No Maven or Gradle. Ant only. :b On Fri, 25 Jun 2021 at 17:34, Owen Thomas mailto:owen.paul.tho...@gmail.com>> wrote: I've just been informed that @Nonnull could be part of javax (the documentation does appear to state this). I don't think I have access to this package because I'm not using anything other than the Java SE API.
Re: @Nonnull?
No Maven or Gradle. Ant only. :b On Fri, 25 Jun 2021 at 17:34, Owen Thomas wrote: > I've just been informed that @Nonnull could be part of javax (the > documentation does appear to state this). I don't think I have access to > this package because I'm not using anything other than the Java SE API. > >
Re: @Nonnull?
I've just been informed that @Nonnull could be part of javax (the documentation does appear to state this). I don't think I have access to this package because I'm not using anything other than the Java SE API.
Re: @Nonnull?
I commonly generate custom runtime exceptions for situations like this, but it perhaps would be nice to have the compiler flag where this situation is likely to happen too. Perhaps it is a feature of a later release... On Fri, 25 Jun 2021 at 15:30, Geertjan Wielenga < geertjan.wiele...@googlemail.com> wrote: > Yes, googled a bit for this, doubt it exists as a feature in JDK 16. > > Gj > > On Fri, 25 Jun 2021 at 07:23, Lars Bruun-Hansen > wrote: > >> What @Nonnull in Java ? Have I missed some news about a new feature >> in the JDK? >> Various third party libraries implement some form of non-null >> annotation and you will have to use one such library ... unless I >> missed some new JDK feature. :-) >> >> >> >> /Lars >> >> >> >> >> >> On Fri, Jun 25, 2021 at 5:40 AM Owen Thomas >> wrote: >> > >> > Ok, thanks Geertjan. Let me know what you find. >> > >> > On Fri, 25 Jun 2021 at 12:59, Geertjan Wielenga < >> geertjan.wiele...@googlemail.com> wrote: >> >> >> >> >> >> Maybe it doesn’t support it yet. Will try to find out. >> >> >> >> Gj >> >> >> >> On Fri, 25 Jun 2021 at 04:39, Owen Thomas >> wrote: >> >>> >> >>> I'm using NB 12.4 with JDK 16 and I have been reading a bit of the >> annotations article from the newest Java Magazine. I thought I'd fiddle >> with the @Nonnull annotation, so I put one in a method's declaration where >> I thought it needed to go so I could indicate that a parameter needed a >> non-null value: >> >>> >> >>> protected boolean checkEqual(@Nonnull SU subscription){ >> >>> >> >>> Netbeans complains that it cannot find the symbol @Nonnull, and it >> does not give me the option to add an import. >> >>> >> >>> Why does this happen? >> >
Re: @Nonnull?
Yes, googled a bit for this, doubt it exists as a feature in JDK 16. Gj On Fri, 25 Jun 2021 at 07:23, Lars Bruun-Hansen wrote: > What @Nonnull in Java ? Have I missed some news about a new feature > in the JDK? > Various third party libraries implement some form of non-null > annotation and you will have to use one such library ... unless I > missed some new JDK feature. :-) > > > > /Lars > > > > > > On Fri, Jun 25, 2021 at 5:40 AM Owen Thomas > wrote: > > > > Ok, thanks Geertjan. Let me know what you find. > > > > On Fri, 25 Jun 2021 at 12:59, Geertjan Wielenga < > geertjan.wiele...@googlemail.com> wrote: > >> > >> > >> Maybe it doesn’t support it yet. Will try to find out. > >> > >> Gj > >> > >> On Fri, 25 Jun 2021 at 04:39, Owen Thomas > wrote: > >>> > >>> I'm using NB 12.4 with JDK 16 and I have been reading a bit of the > annotations article from the newest Java Magazine. I thought I'd fiddle > with the @Nonnull annotation, so I put one in a method's declaration where > I thought it needed to go so I could indicate that a parameter needed a > non-null value: > >>> > >>> protected boolean checkEqual(@Nonnull SU subscription){ > >>> > >>> Netbeans complains that it cannot find the symbol @Nonnull, and it > does not give me the option to add an import. > >>> > >>> Why does this happen? >
Re: @Nonnull?
What @Nonnull in Java ? Have I missed some news about a new feature in the JDK? Various third party libraries implement some form of non-null annotation and you will have to use one such library ... unless I missed some new JDK feature. :-) /Lars On Fri, Jun 25, 2021 at 5:40 AM Owen Thomas wrote: > > Ok, thanks Geertjan. Let me know what you find. > > On Fri, 25 Jun 2021 at 12:59, Geertjan Wielenga > wrote: >> >> >> Maybe it doesn’t support it yet. Will try to find out. >> >> Gj >> >> On Fri, 25 Jun 2021 at 04:39, Owen Thomas wrote: >>> >>> I'm using NB 12.4 with JDK 16 and I have been reading a bit of the >>> annotations article from the newest Java Magazine. I thought I'd fiddle >>> with the @Nonnull annotation, so I put one in a method's declaration where >>> I thought it needed to go so I could indicate that a parameter needed a >>> non-null value: >>> >>> protected boolean checkEqual(@Nonnull SU subscription){ >>> >>> Netbeans complains that it cannot find the symbol @Nonnull, and it does not >>> give me the option to add an import. >>> >>> Why does this happen? - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: @Nonnull?
Ok, thanks Geertjan. Let me know what you find. On Fri, 25 Jun 2021 at 12:59, Geertjan Wielenga < geertjan.wiele...@googlemail.com> wrote: > > Maybe it doesn’t support it yet. Will try to find out. > > Gj > > On Fri, 25 Jun 2021 at 04:39, Owen Thomas > wrote: > >> I'm using NB 12.4 with JDK 16 and I have been reading a bit of the >> annotations article from the newest Java Magazine. I thought I'd fiddle >> with the @Nonnull annotation, so I put one in a method's declaration where >> I thought it needed to go so I could indicate that a parameter needed a >> non-null value: >> >> protected boolean checkEqual(@Nonnull SU subscription){ >> >> Netbeans complains that it cannot find the symbol @Nonnull, and it does >> not give me the option to add an import. >> >> Why does this happen? >> >
Re: @Nonnull?
Maybe it doesn’t support it yet. Will try to find out. Gj On Fri, 25 Jun 2021 at 04:39, Owen Thomas wrote: > I'm using NB 12.4 with JDK 16 and I have been reading a bit of the > annotations article from the newest Java Magazine. I thought I'd fiddle > with the @Nonnull annotation, so I put one in a method's declaration where > I thought it needed to go so I could indicate that a parameter needed a > non-null value: > > protected boolean checkEqual(@Nonnull SU subscription){ > > Netbeans complains that it cannot find the symbol @Nonnull, and it does > not give me the option to add an import. > > Why does this happen? >