sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Schaefer <>
Subject Re: coding style and annotations
Date Tue, 12 Nov 2019 19:40:07 GMT
Hi Angela

One of the biggest issues I ran into with Null Annotation is that getParent() can return null
when it is the root.
This is fine as in my code I never deal with root but SonarCloud does not care and flags all
of the getParent() calls to have a null check.
Not sure how to fix this but for sure it shows how ’stupid’ tools are if just applied

Cheers - Andy

> On Nov 12, 2019, at 12:56 AM, Angela Schreiber <> wrote:
> hi sling devs
> when writing patches for the repo init recently, i noticed that there is some inconsistency
in the formatting and that the code doesn't come with notnull/nullable annotations, which
leads to a quite some extra checks for null, though the input will never be null.
> having said that: is there an official coding style that i should follow when fixing
the formatting inconsistencies? are notnull/nullable annotiations being used in the sling
> kind regards
> angela

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