From dcc44e0788e1a8227f3bce77b684ce3639bd2839 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Mon, 18 Apr 2016 15:57:50 +0000 Subject: [PATCH] --- pre-review-checklist.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pre-review-checklist.md b/pre-review-checklist.md index 3c85fe9..aab0b9f 100644 --- a/pre-review-checklist.md +++ b/pre-review-checklist.md @@ -2,7 +2,7 @@ * Classes should be immutable where possible * Classes that may be used by multiple threads must be thread-safe * If a class is used by a single thread and is not thread-safe, add a comment -* Fields that are accessed by multiple threads must be volatile or guarded by locks +* Fields that are used by multiple threads must be volatile or guarded by locks * If a field or method is guarded by a lock, add a comment #### Visibility @@ -11,9 +11,10 @@ * Fields should be final where possible * Inner classes should be static where possible -#### Instantiation -* Don't allow `this` to escape the constructor +#### Constructors and Dependencies +* Never allow `this` to escape the constructor * Complex dependencies should be injected or constructed by factories +* Avoid static methods, except for simple and ubiquitous tasks * Use executors rather than creating threads where possible #### Exceptions