Stirling, James, Sir, Chancery judge