manual merge of #425 handling subresource locators with return type class