THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- In general logging is a good idea.
- Use Commons Logging.
- For debug messages, call
if (log.isDebugEnabled())
prior to callinglog.debug()
. - The following code is usually bad. There is no need to log exception and re-throw it:
Either log it, or re-throw.Code Block try { } catch (Exception e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); }
Formatting
- In perfect world all people, who contribute code, use the same IDE with the same formatting preferences.
- It should be a good idea to attach a formatter profile for Eclipse that contributors are expected to use.
- Anyway for people, who don't use Eclipse, or want to keep their formatting preferences, let's define some basic rules:
- Do not use Tab. For indentation use only spaces. Indentation size is 4 spaces.
- Maximum line width: 100 characters.
...