Object creation must be followed by mandatory methods that must be called on the created object.
1public void checkParameterDescriptionAllCallNoncompliant() {
2 // Noncompliant: does not call mandatory methods on the object after its creation.
3 PutParameterRequest putParameterRequest = new PutParameterRequest();
4 putParameterRequest.setName("parameterName");
5}
1public void checkParameterDescriptionAllCallCompliant() {
2 // Compliant: calls the mandatory methods on the objects after its creation.
3 PutParameterRequest putParameterRequest = new PutParameterRequest();
4 putParameterRequest.setDescription("Description");
5 putParameterRequest.setName("parameterName");
6}