remove java7-dependent methods of exceptions