Permalink
Browse files

HBASE-7512 Document the findbugs library annotation

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1431910 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
saintstack committed Jan 11, 2013
1 parent 251dc8c commit bb5ac32a46071dc536e23bc9d0acdd1ccfbc2b3c
Showing with 27 additions and 0 deletions.
  1. +27 −0 src/docbkx/developer.xml
View
@@ -1059,15 +1059,42 @@ Bar bar = foo.getBar(); <--- imagine there's an extra space(s) after the
</section>
<section xml:id="common.patch.feedback.writable">
<title>Implementing Writable</title>
+ <note>
+ <title>Applies pre-0.96 only</title>
+ <para>In 0.96, HBase moved to protobufs. The below section on Writables
+ applies to 0.94.x and previous, not to 0.96 and beyond.
+ </para>
+ </note>
<para>Every class returned by RegionServers must implement <code>Writable</code>. If you
are creating a new class that needs to implement this interface, don't forget the default constructor.
</para>
</section>
<section xml:id="common.patch.feedback.javadoc">
<title>Javadoc</title>
<para>This is also a very common feedback item. Don't forget Javadoc!
+ <para>Javadoc warnings are checked during precommit. If the precommit tool gives you a '-1',
+ please fix the javadoc issue. Your patch won't be committed if it adds such warnings.
+ </para>
</para>
</section>
+ <section xml:id="common.patch.feedback.findbugs">
+ <title>Findbugs</title>
+ <para>
+ Findbugs is used to detect common bugs pattern. As Javadoc, it is checked during
+ the precommit build up on Apache's Jenkins, and as with Javadoc, please fix them.
+ You can run findbugs locally with 'mvn findbugs:findbugs': it will generate the
+ findbugs files locally. Sometimes, you may have to write code smarter than
+ Findbugs. You can annotate your code to tell Findbugs you know what you're
+ doing, by annotating your class with:
+ <programlisting>@edu.umd.cs.findbugs.annotations.SuppressWarnings(
+ value="HE_EQUALS_USE_HASHCODE",
+ justification="I know what I'm doing")</programlisting>
+ </para>
+ <para>
+ Note that we're using the apache licensed version of the annotations.
+ </para>
+ </section>
+
<section xml:id="common.patch.feedback.javadoc.defaults">
<title>Javadoc - Useless Defaults</title>
<para>Don't just leave the @param arguments the way your IDE generated them. Don't do this...

0 comments on commit bb5ac32

Please sign in to comment.