mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 21:59:54 +01:00
Update pre review checklist
@@ -1,13 +1,13 @@
|
|||||||
#### Thread safety
|
#### Thread safety
|
||||||
* Classes should be immutable where possible
|
* Classes should be immutable where possible
|
||||||
* Classes that may be used by multiple threads must be thread-safe
|
* 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
|
* If a class is not thread-safe, annotate it @NotThreadSafe
|
||||||
* Fields that are used 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
|
* If a field or method is guarded by a lock, add a comment, e.g. `// Locking: foo`
|
||||||
|
|
||||||
#### Visibility
|
#### Visibility
|
||||||
* Minimise the visibility of classes, fields and methods
|
* Minimise the visibility of classes, fields and methods
|
||||||
* Fields should be private or protected
|
* Fields should usually be private, with getters and setters if needed
|
||||||
* Fields should be final where possible
|
* Fields should be final where possible
|
||||||
* Inner classes should be static where possible
|
* Inner classes should be static where possible
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user