| Summary: | Throw new RuntimeException ("This method has not been implemented yet"); instead of return null; | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Lars Svensson <oxvalley> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | daniel_megert, remy.suen |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Yes, I know you can write your own Code Template that does this, but I am suggesting the default code template should do this... Of Cource I ment selecting "Create new Method" from Lightbulb menu, not "Refactoring" to get this template method...sorry.. Sorry, but we won't change the default. It is very practical that the generated code doesn't fail while filling in the code for all the generated code. And as you said: you can change this via template if you want. We actually also run code that has compile errors. |
Build Identifier: In Netbeans they have another approach whne you refactor->Extract Metod than in Eclipse: Eclipse: private String getString(){ // TODO auto-generated message stub return null; } Netbeans: private String getString(){ Throw new RuntimeException ("This method has not been implemneted yet"); } I think the Netbeans way is better since it will compile but will automaticallyfail if you try to run this method. In Eclipse I sometimes forget to implemnet this method and can get strange errors since the method is actually working but most certain return a value I do not want. Reproducible: Always