To get help, open an issue on Github. Note that you can do this to ask simple questions too, not just if you find a bug!
// @formatter:off
and // @formatter:on
to disable the
auto formatting:
// @formatter:off String sql = "SELECT color " + "FROM napoleon_horses " + "WHERE color='white'"; // @formatter:on
private
methods. Use protected
for a method that shouldn't be public
.
private
, but a public
or
protected
getter should exist for them.
final
member variables, when possible.
/** comment */
style for the
Javadoc. You can use this style for comments which are not Javadoc:
//========================================== // This is a comment //========================================== String hello = "World";But regular comment style is ok too :
// This is a comment String hello = "World";
UTF-8
encoded (except .properties
files which should be ISO-8859-1
)
UTF-8
everywhere an encoding is involved!
"\n"
. No Windows's "\r\n"
newlines.
if
condition.
Don't do this:
if(someCondition) // no braces... :-(
UTC
if no timezone is specified. If you
need to store a date, store it as UTC
. Only when displaying or outputting the
date will you use the user's timezone, if available.
DefaultIntegrationTestingBase
or, at least, SpincastGuiceBasedTestBase
. Make sure you understand our custom
SpincastJUnitRunner
JUnit runner, which creates one instance
of a test class only! For our unit tests, we often start an Undertow
server instance even if it could be done without one:
Undertow is very fast to boot.