Reducing State
- Data at rest is dangerous. Data in motion is safer
- Wherever possible, avoid storing data yourself
- Limit where in the code your data can be accessed
- Especially limit where data can be written
- Java access modifiers (
public, private, protected
) are a good defense - Make data private where possible
- Make member variables final where possible
5 / 22