| Summary: | Extract Local Variable throws an exception... | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Farnaz Behrang <behrang.farnaz> |
| Component: | cdt-refactoring | Assignee: | Project Inbox <cdt-refactoring-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Sergey Prigogin <eclipse.sprigogin> |
| Severity: | minor | ||
| Priority: | P3 | CC: | cdtdoug, com-eclipse-dot-org, malaperle |
| Version: | 8.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 407506 *** |
In the following program... ========== typedef struct { #ifndef a unsigned long b[3]; /* */ #endif }; int main(){ int c; if (c==1){}; //select c==1 return 0; } ========== If you select 'c=1', and invoke the Extract Local Variable refactoring, program throws the following exception: Caused by: java.lang.NullPointerException at org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.ASTCommenter$PreprocessorRangeChecker.isCommentOnSameLine(ASTCommenter.java:86) at org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.ASTCommenter$PreprocessorRangeChecker.checkOffsets(ASTCommenter.java:70) at org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.ASTCommenter$PreprocessorRangeChecker.visit(ASTCommenter.java:141) . . .