Thank you for pointing that out. The IntelliJ annotations used to have
Runtime retention, but they now have Class retention.
— Miguel Muñoz
On Fri, Aug 28, 2020 at 7:54 AM Xeno Amess wrote:
> > IntelliJ specifies Runtime retention so they can interact
> with IntelliJ's internal JRE, which
As I see it, the annotations serve two purposes. They clarify for the users
where nulls are legal values, and they allow development tools to leverage
the information to provide more detailed inspections. Some colleagues have
objected to their use claiming that, we don't want to rely on a specific
https://imgur.com/gGRHH5i
https://imgur.com/THMdel1
Xeno Amess 于2020年8月29日周六 上午12:46写道:
> https://imgur.com/gGRHH5i
> https://imgur.com/THMdel1
> will try imgur
>
> Gary Gregory 于2020年8月29日周六 上午12:44写道:
>
>> The PNG links yield Temporary Error (404).
>>
>> Gary
>>
>> On Fri, Aug 28, 2020 at
https://imgur.com/gGRHH5i
https://imgur.com/THMdel1
will try imgur
Gary Gregory 于2020年8月29日周六 上午12:44写道:
> The PNG links yield Temporary Error (404).
>
> Gary
>
> On Fri, Aug 28, 2020 at 12:31 PM Xeno Amess wrote:
>
>> @Gary Gregory
>> the outcome is:
>> Eclipse users CAN use those
The PNG links yield Temporary Error (404).
Gary
On Fri, Aug 28, 2020 at 12:31 PM Xeno Amess wrote:
> @Gary Gregory
> the outcome is:
> Eclipse users CAN use those annotations, but MUST install a eclipse-plugin
> to detect those bugs and show them on screen.
> (though both idea and eclipse
@Gary Gregory
the outcome is:
Eclipse users CAN use those annotations, but MUST install a eclipse-plugin
to detect those bugs and show them on screen.
(though both idea and eclipse users CAN choose to use maven plugin to do it
lol)
The plugin is:
eclipse_2020-08-29_00-28-02.png
(14 K)
> Keep in mind that not everyone uses IJ, for example, I use Eclipse.
Yep.
And not every jetbrains library requires people use idea.
I think Eclipse can supports those annotations.
Let me, have a test :)
Gary Gregory 于2020年8月28日周五 下午11:04写道:
> Keep in mind that not everyone uses IJ, for
Keep in mind that not everyone uses IJ, for example, I use Eclipse.
Gary
On Fri, Aug 28, 2020 at 10:54 AM Xeno Amess wrote:
> > IntelliJ specifies Runtime retention so they can interact
> with IntelliJ's internal JRE, which adds additional assertions into the
> code to enforce the
> IntelliJ specifies Runtime retention so they can interact
with IntelliJ's internal JRE, which adds additional assertions into the
code to enforce the annotations.
seems never.
see this demo repo.
https://github.com/XenoAmess/demo_jetbrains_annotation
And I looked up the sources and see every
Good question. IntelliJ specifies Runtime retention so they can interact
with IntelliJ's internal JRE, which adds additional assertions into the
code to enforce the annotations. So even though they have Runtime
retention, they're still a development-phase tool. In production, they
don't need to be
I find them to be useful in two ways.
1) The document which parameters and return values may be null, and which
can't.
2) I use them in conjunction with IntelliJ's Constant Conditions and
Exceptions inspection. (This inspection lets me specify what annotations to
use for Nullable and NotNull, so
FindBugs and SpotBugs support the annotations. I mentioned that instead of
the javax package version of the annotations for the JPMS reason mentioned
by someone else earlier. That’s what we’re using in Jenkins (along with a
mix of which annotation sets are used, but that’s the nature of a plugin
Does SpotBugs use these annotations? If not, can SB make use of any
annotations?
Gary
On Wed, Aug 26, 2020 at 2:30 AM Romain Manni-Bucau
wrote:
> For what it is worth:
>
> 1. Generally speaking - and IMHO - these annotations only make sense in a
> particular tooling setup(s) - like considering
e ide also knows whether this function
> >
> > can return null.
> >
> > That will simplify a lot of human time to check.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > Xeno Amess 于2020年4月24日周五 下午6:
> my point is if we want to go that path, which validation do we add to
ensure it is correct
Oh I see what you mean.
I think there exist some toolchains which can do this, but I have no
experience in doing the auto-validation myself.
Maybe some source analyze plugin like pmd-maven-plugin can do
> However, I've got a question: These annotations have
@Retention(Runtime). (See
https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/latest/javax/annotation/Nullable.html
.)
Aren't we enforcing the presence of the respective jar at runtime?
Hi.
Usually, for Annotations, it have 3 ways to
Le mer. 26 août 2020 à 08:42, Xeno Amess a écrit :
> > how do we guarantee our meta are right and don't create false positives
> If we cannot even make the meta correct, then means we cannot make sure
> which function can return Null, which can not,
> Then why do you think our customers can do.
> how do we guarantee our meta are right and don't create false positives
If we cannot even make the meta correct, then means we cannot make sure
which function can return Null, which can not,
Then why do you think our customers can do.
And if people who write these libs are not sure which
For what it is worth:
1. Generally speaking - and IMHO - these annotations only make sense in a
particular tooling setup(s) - like considering values which can be null by
code analysis and not by spec (@NotNull) - which I'm not sure we have so it
is mainly about making it consumer friendly but
Runtime retention still doesn’t require the annotations to be present on
the classpath unless you perform reflection on them (I forget the
specifics). It’s a feature specific to annotations.
On Tue, Aug 25, 2020 at 14:36 Jochen Wiedmann
wrote:
> On Tue, Aug 25, 2020 at 9:08 PM sebb wrote:
>
>
On Tue, Aug 25, 2020 at 9:08 PM sebb wrote:
> AFAIK that means Maven won't download the dependency.
> Surely that makes it harder for the developer?
No, it means that Maven won't add the dependency to a distribution.
However, I've got a question: These annotations have
@Retention(Runtime).
who invoke these functions have a clear idea whether
> > > this
> > > > >
> > > > > function can return null.
> > > > >
> > > > > And more importantly maybe, let the ide also knows whether this
> > >
; > >
> > > > function can return null.
> > > >
> > > > And more importantly maybe, let the ide also knows whether this
> > function
> > > >
> > > > can return null.
> > > >
> > &
can return null.
> > >
> > > And more importantly maybe, let the ide also knows whether this
> function
> > >
> > > can return null.
> > >
> > > That will simplify a lot of human time to check.
> > >
> > >
> > &
>
> > function can return null.
> >
> > And more importantly maybe, let the ide also knows whether this function
> >
> > can return null.
> >
> > That will simplify a lot of human time to check.
> >
> >
> >
> > Any ideas?
>
ar idea whether this
>
> function can return null.
>
> And more importantly maybe, let the ide also knows whether this function
>
> can return null.
>
> That will simplify a lot of human time to check.
>
>
>
> Any ideas?
>
>
>
> Xeno Amess 于2020年4月24日周五
r idea whether this
function can return null.
And more importantly maybe, let the ide also knows whether this function
can return null.
That will simplify a lot of human time to check.
Any ideas?
Xeno Amess 于2020年4月24日周五 下午6:50写道:
> I want to know about your opinions about @NotNull and
I want to know about your opinions about @NotNull and @Nullable.
Should we use it in every function?
Or we use it only at some misleading places?
Or simply not use them at all?
thx.
28 matches
Mail list logo