From 6b97306c1e9a423a313aea3af04157ffa0f526c3 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 11 Jan 2013 06:45:18 +0000 Subject: [PATCH] HBASE-7512 Document the findbugs library annotation git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1431910 13f79535-47bb-0310-9956-ffa450edef68 --- src/docbkx/developer.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/docbkx/developer.xml b/src/docbkx/developer.xml index 7704e823cc7..b98e131af72 100644 --- a/src/docbkx/developer.xml +++ b/src/docbkx/developer.xml @@ -1059,6 +1059,12 @@ Bar bar = foo.getBar(); <--- imagine there's an extra space(s) after the
Implementing Writable + + Applies pre-0.96 only + 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. + + Every class returned by RegionServers must implement Writable. If you are creating a new class that needs to implement this interface, don't forget the default constructor. @@ -1066,8 +1072,29 @@ Bar bar = foo.getBar(); <--- imagine there's an extra space(s) after the
Javadoc This is also a very common feedback item. Don't forget Javadoc! + 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. +
+
+ Findbugs + + 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: + @edu.umd.cs.findbugs.annotations.SuppressWarnings( + value="HE_EQUALS_USE_HASHCODE", + justification="I know what I'm doing") + + + Note that we're using the apache licensed version of the annotations. + +
+
Javadoc - Useless Defaults Don't just leave the @param arguments the way your IDE generated them. Don't do this...