Project: JDT
Bug 57822 Add new suggestion 'throw new Exception' to 'throw Exception' [quick fix]
Reported: 2004-04-07 17:47:00 | Status: resolved fixed

I (accidentally) typed in: throw RuntimeException("message"); in my code (which of course didn't compile). The quick-fix suggestion was to create a method called 'RuntimeException', but it should hopefully have also detected that RuntimeException is the name of a known Exception, and suggested instead 'throw new RuntimeException("message")' which is of course the one that I wanted. Obviously a minor enhancement, but a feature request all the same.

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UnresolvedMethodsQuickFixTest.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java