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 @CheckForNull
return qualifier from javax.annotation
package.
Methods that can’t return null
must be annotated with @Nonnull
.
The same for Arguments.
@Nullable
must be used only for changing inherited (other typed) qualifier.
Setters in builder style must be prefixed with withXX
.
All classes should provide toString()
equals()
and hashCode()
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 Serializable
it shall have a serialVersionUID
field. Unless code has shipped to users, the initial value of the serialVersionUID
field shall be 1L
.
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.yml
to single run (to not consume their resources with matrix run).
Remove travis-logback.xml
replacement (build can’t output everything in every run because travis has log limitation).
Set single test in pom.xml
for maven-failsafe-plugin
Make PR or if you are maintainer push to branch, catch log and fix.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close