Issue #1910 Fix NPE when statusHandler not in debug

Change-Id: I5bb9c213491e485e3985bd7f4d5035aa2945869b

Former-commit-id: f1d4b5d329 [formerly da7a648a61 [formerly 18bc074721877b26f04bd3a2d0f784b8e208c25e]]
Former-commit-id: da7a648a61
Former-commit-id: cd1733fd7f
This commit is contained in:
Dustin Johnson 2013-04-26 13:56:38 -05:00
parent 8adfc0ca86
commit b1d9b148ea

View file

@ -232,12 +232,13 @@ public class ValidatorImpl implements Validator {
// Find any specific validator for this type
Validator validator = validatorPlugins
.getRegisteredObject(objectType);
if (validator == null
&& statusHandler.isPriorityEnabled(Priority.DEBUG)) {
statusHandler
.debug("There is no plugin validator for registry objects with type ["
+ objectType
+ "]. Only the generic registry object validator will be used...");
if (validator == null) {
if (statusHandler.isPriorityEnabled(Priority.DEBUG)) {
statusHandler
.debug("There is no plugin validator for registry objects with type ["
+ objectType
+ "]. Only the generic registry object validator will be used...");
}
} else {
final ValidateObjectsResponse validateRegistryObjectsResponse = validator
.validateObjects(request);