Update method getConstants to avoid BC break