if (vPath.isEmpty() && !vPath.isExpectedType(PDResources.class))
{
throw new ValidationException("ShadingPattern validation required at least a PDResources");
}
PDShadingResources shaddingResource = (PDShadingResources) vPath.peek();
PDPage page = vPath.getClosestPathElement(PDPage.class);
checkColorSpace(context, page, shaddingResource);
checkGraphicState(context, page, shaddingResource);
}