Issue #1910 Fix NPE when statusHandler not in debug

Change-Id: I5bb9c213491e485e3985bd7f4d5035aa2945869b

Former-commit-id: 18bc074721877b26f04bd3a2d0f784b8e208c25e
This commit is contained in:
Dustin Johnson 2013-04-26 13:56:38 -05:00
parent af9cc8e793
commit f1d4b5d329

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);