Class::getCanonicalName may return null (#882)

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
pull/893/head
Markus Rathgeb 2019-06-20 21:24:20 +02:00 committed by Kai Kreuzer
parent bf9f86354b
commit a75fbe1e42
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ public abstract class BaseThingHandlerFactory implements ThingHandlerFactory {
// we only add specific ThingHandlerServices, i.e. those that derive from the
// ThingHandlerService interface, NOT the ThingHandlerService itself. We do this to register
// them as specific OSGi services later, rather than as a generic ThingHandlerService.
if (!ThingHandlerService.class.getCanonicalName().equals(className)) {
if (className != null && !className.equals(ThingHandlerService.class.getCanonicalName())) {
serviceNames.add(className);
}
}