#vulnerable code 
                                private Designer getDesigner(Object adaptable) {
        return getResourceResolver(adaptable).adaptTo(Designer.class);
    } 
                            #location 2 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                private Designer getDesigner(Object adaptable) {
        ResourceResolver resolver = getResourceResolver(adaptable);

        if(resolver != null) {
            return resolver.adaptTo(Designer.class);
        }

        return null;
    }