Note: this is a set of recommendations, not requirements.
Before you commit, make sure to run the Spotless formatter:
$ mvn spotless:apply
- Prefer plain constructors to factory static methods (e.g.,
new ABC()
overABC.create()
/ABC.of()
). - Do use factory methods when:
- some initialization logic cannot be expressed from a constructor, or it becomes inelegant,
- hiding a concrete implementation behind an interface (e.g.,
val vertx = Vertx.vertx();
).
- Prefer the JavaBeans convention of
getABC()
/setABC(abc)
for domain objects that are intended to be serialized through Jackson.
- Prepend
Insights
to the interface definitions of top-level components (e.g.,InsightsHttpClient
).