forked from OpenRefine/OpenRefine
-
Notifications
You must be signed in to change notification settings - Fork 3
Coding style
David Leoni edited this page Jun 6, 2014
·
9 revisions
We used some keywords in comments to identify certain code sections. They all start with odr.
All modified Refine code is enclosed in these comments:
// odr start
// odr end
New classes added in Refine namespace are marked with
/**
odr new
*/
Comments that were already in Refine and have been changed or added are marked with
/**
odr comment
*/
todo find & replace odr javadoc with odr comment
To mark nullable variables we used the @Nullable tag from from JSR-305. Latest IDEs can recognize the tag and warn about unchecked null usage. Wherever possible we also marked Refine nullable fields. We consider all the objects as non null unless marked otherwise. todo how to configure default value?
Example usage:
@Nullable String s;
Not-so-clean code is marked with
// odr dirty
In the future we might consider switching to proper Lombok tags.