sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1007873 - in /websites/staging/sling/trunk/content: ./ documentation/development/jsr-305.html
Date Tue, 07 Mar 2017 07:51:53 GMT
Author: buildbot
Date: Tue Mar  7 07:51:53 2017
New Revision: 1007873

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/development/jsr-305.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Mar  7 07:51:53 2017
@@ -1 +1 @@
-1785804
+1785805

Modified: websites/staging/sling/trunk/content/documentation/development/jsr-305.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/development/jsr-305.html (original)
+++ websites/staging/sling/trunk/content/documentation/development/jsr-305.html Tue Mar  7
07:51:53 2017
@@ -129,7 +129,7 @@ h2:hover > .headerlink, h3:hover > .head
 </ul>
 </div>
 <h1 id="introduction">Introduction<a class="headerlink" href="#introduction" title="Permanent
link">&para;</a></h1>
-<p>The Sling API forces developers to sometimes check for <code>null</code>
return values. Most prominently this is the case for <a href="https://sling.apache.org/apidocs/sling7/org/apache/sling/api/adapter/Adaptable.html#adaptTo-java.lang.Class-"><code>Adaptable.adaptTo</code></a>
and <a href="https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html#getResource-java.lang.String-"><code>ResourceResolver.getResource</code></a>.
This is often forgotten, which may lead to <code>NullPointerException</code>s.
Sling API 2.9.0 introduced the JSR-305 annotations (<a href="https://issues.apache.org/jira/browse/SLING-4377">SLING-4377</a>)
which allow tools to check automatically for missing null checks in the code.</p>
+<p>The Sling API forces developers to sometimes check for <code>null</code>
return values. Most prominently this is the case for <a href="https://sling.apache.org/apidocs/sling8/org/apache/sling/api/adapter/Adaptable.html#adaptTo-java.lang.Class-"><code>Adaptable.adaptTo</code></a>
and <a href="https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html#getResource-java.lang.String-"><code>ResourceResolver.getResource</code></a>.
This is often forgotten, which may lead to <code>NullPointerException</code>s.
Sling API 2.9.0 introduced the JSR-305 annotations (<a href="https://issues.apache.org/jira/browse/SLING-4377">SLING-4377</a>)
which allow tools to check automatically for missing null checks in the code.</p>
 <h1 id="annotations">Annotations<a class="headerlink" href="#annotations" title="Permanent
link">&para;</a></h1>
 <p>The annotations used within Sling are based on the <a href="https://jcp.org/en/jsr/detail?id=305">JSR-305</a>
which is dormant since 2012. Nevertheless those annotations are understood by most of the
tools and used by other Apache Projects like Apache Oak <a href="https://issues.apache.org/jira/browse/OAK-37">OAK-37</a>.</p>
 <p>Due to the fact that Eclipse and FindBugs are interpreting annotations differently
(<a href="https://sourceforge.net/p/findbugs/bugs/1355/">Findbugs-1355</a>). Sling
only uses the following two different annotations which are supported by both tools:</p>
@@ -217,9 +217,9 @@ The full list of options for JDT is desc
 <p>Findbugs is also integrated in <a href="http://docs.sonarqube.org/display/SONAR/Findbugs+Plugin">SonarQube</a>
but for SonarQube you should now rather use the native Java plugin 
 (look at <a href="#use-with-sonarqube">Use with SonarQube</a>).</p>
 <h1 id="use-with-sonarqube">Use with SonarQube<a class="headerlink" href="#use-with-sonarqube"
title="Permanent link">&para;</a></h1>
-<p>At least rule <a href="https://sonarqube.com/coding_rules#rule_key=squid%3AS2259">squid:S2259</a>
in SonarQube supports JSR 305 annotations as well for null checks.</p>
+<p>At least rule <a href="https://sonarqube.com/coding_rules#rule_key=squid%3AS2259">squid:S2259</a>
in SonarQube supports JSR-305 annotations as well for null checks.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1785804 by kwin on Tue, 7 Mar 2017 07:50:17 +0000
+        Rev. 1785805 by kwin on Tue, 7 Mar 2017 07:51:43 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project



Mime
View raw message