ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Goncharuk <alexey.goncha...@gmail.com>
Subject Re: JetBrains Annotaions usage.
Date Thu, 28 Jul 2016 14:15:27 GMT
According to the JLS [1], adding or removing annotations has no effect on
the correct linkage of the binary representations of programs in the Java
programming language. Even if these annotations were RUNTIME, a user could
successfully use Ignite unless he explicitly uses those classes in runtime.
See also [2]

[1] https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.5.7
[2] http://bugs.java.com/view_bug.do?bug_id=6322301

2016-07-28 16:29 GMT+03:00 Anton Vinogradov <avinogradov@gridgain.com>:

> Dmitriy,
>
> Annotations have @Retention(RetentionPolicy.CLASS)
> which means
>      * Annotations are to be recorded in the class file by the compiler
>      * but need not be retained by the VM at run time.  This is the default
>      * behavior.
>
> So, from what I understand, everyone using ignite API with such annotations
> still require them, correct?
>
> On Thu, Jul 28, 2016 at 4:16 PM, Dmitriy Setrakyan <dsetrakyan@apache.org>
> wrote:
>
> > Anton, compile-time annotations should mean that Ignite should not
> require
> > these libraries at runtime. Did you try it already and run into issues?
> >
> > On Thu, Jul 28, 2016 at 4:34 AM, Anton Vinogradov <
> > avinogradov@gridgain.com>
> > wrote:
> >
> > > Possible, what's the solution in this case?
> > >
> > > On Thu, Jul 28, 2016 at 11:17 AM, Sergi Vladykin <
> > sergi.vladykin@gmail.com
> > > >
> > > wrote:
> > >
> > > > I don't think that JB annotations is a runtime dependency, we should
> > need
> > > > them only at compile time, no?
> > > >
> > > > Sergi
> > > >
> > > > 2016-07-28 11:09 GMT+03:00 Anton Vinogradov <av@apache.org>:
> > > >
> > > > > Igniters,
> > > > >
> > > > > As you may know we had only 2 dependencies at ignite-core: jcache
> and
> > > > > ignite-shmen.
> > > > >
> > > > > IGNITE-3323 Get rid of copypasted JB annotations, use dependency
> > > instead.
> > > > > <https://issues.apache.org/jira/browse/IGNITE-3323> brings
one
> more
> > > > > dependency to org.jetbrains.annotations.
> > > > > This solves problems for people using JB annotations at their
> > projects.
> > > > but
> > > > > makes ignite-core less dependency-lightweight.
> > > > >
> > > > > JB annotaions are used to highlight null problems in IDE and
> provide
> > > some
> > > > > understanding to users on whether null is allowed/possible in
> > concrete
> > > > > place. I doubt other products/frameworks use it much.
> > > > >
> > > > > But, do we really need them? As for me, we can replace all these
> > > > > annotations by asserts.
> > > > >
> > > > > I propose to discontinue usage of jb annotation and replace them
by
> > > > > asserts.
> > > > >
> > > > > Thoughts?
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message