apply jsr 305 annotations just make codes neat (IMO)
also good for quite some ide/analyzing tools when they try index/auto find
bugs.
well there be very many jsr-305 impls so if not jetbrains we can use google
code or even impl our own one.
negative point is we need another dependency(though usually a very small
size one.)

Claude Warren <cla...@xenei.com> 于2024年10月16日周三 21:49写道:

> What is the general stance on commons to import the annotations?  Is there
> a reason not to?  I'm happy to make the changes but want to make sure there
> is not a blocker first.
>
> Claude
>
> On Tue, Oct 15, 2024 at 9:56 AM Xeno Amess <xenoam...@gmail.com> wrote:
>
> > yep, I always think, this kind of allow null not allow null things shall
> be
> > marked not by doc, but by annotations.
> >
> > Xeno Amess <xenoam...@gmail.com> 于2024年10月15日周二 04:10写道:
> >
> > > 1. important jetbrains annotations as maven dependency.
> > > 2.add @Nullable in parent class's param
> > > 3.add @NotNull at child class param
> > >
> > > ------------------------------
> > > *From:* Gary D. Gregory <ggreg...@apache.org>
> > > *Sent:* Tuesday, October 15, 2024 3:29:20 AM
> > > *To:* dev@commons.apache.org <dev@commons.apache.org>
> > > *Subject:* [CLI] Javadoc
> > >
> > > Hi All,
> > >
> > > We now have append methods like:
> > >
> > > public interface HelpAppendable extends Appendable {
> > >
> > >     /**
> > >      * Appends a header.
> > >      *
> > >      * @param level the level of the header. This is equivalent to the
> > > "1", "2", or "3" in the HTML "h1", "h2", "h3" tags.
> > >      * @param text  the text for the header
> > >      * @throws IOException on write failure
> > >      */
> > >     void appendHeader(int level, CharSequence text) throws IOException;
> > >
> > > ...
> > >
> > > The supertype defines behavior for null input, but here we do not, we
> > > should either document it as:
> > > - Same as the super type, same kind of Javadoc
> > > - Explicitly document that it is up to the implementing class
> > >
> > > Thoughts?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > > For additional commands, e-mail: dev-h...@commons.apache.org
> > >
> > >
> >
>
>
> --
> LinkedIn: http://www.linkedin.com/in/claudewarren
>

Reply via email to