-
Model is based on Objects and not primitives that allows nullify requests and have null values for data that wasn’t provided by docker daemon.
-
For null safeness findbugs annotations are used.
-
Every method that may return
null(and we are unsure in any fields as docker daemon may change something) should be annotated with@CheckForNullreturn qualifier fromjavax.annotationpackage. -
Methods that can’t return
nullmust be annotated with@Nonnull. -
The same for Arguments.
-
@Nullablemust be used only for changing inherited (other typed) qualifier.
-
-
Setters in builder style must be prefixed with
withXX. -
All classes should provide
toString()equals()andhashCode()defined methods. -
Javadocs
-
Provide full information on field:
-
For models define API version with
@since {@link RemoteApiVersion#VERSION_1_X}.
-
-
getters/setters should refernce to field
@see #$field.
-
-
If it is
Serializableit shall have aserialVersionUIDfield. Unless code has shipped to users, the initial value of theserialVersionUIDfield shall be1L.
-
TBD, some initial styling already enforced with checkstyle. IDEA/checkstyle file analogues will be provided soon.
-
Unit tests for serder (serialization-deserialization).
-
Integration tests for commands.
-
If model object has builders, then fill it with data and compare by
equals()with expected response from docker daemon. If failed, then some fields mappings are wrong.
-
When there are unreproducible Travis errors:
-
Try locally run test 10-20 times in IDE against the same docker daemon version and same connection type (tcp or socket).
-
Limit
.travis.ymlto single run (to not consume their resources with matrix run). -
Remove
travis-logback.xmlreplacement (build can’t output everything in every run because travis has log limitation). -
Set single test in
pom.xmlfor maven-failsafe-plugin -
Make PR or if you are maintainer push to branch, catch log and fix.
-