| Summary: | [extract method] NPE during extract method refactoring | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ulli Hafner <Knut.Friedhelm> | ||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, frederic_fusier | ||||
| Version: | 3.6 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ulli Hafner
Created attachment 168886 [details]
File that causes the exception
Here is the selection that I used for the extract method refactoring:
SashForm leftVerticalSash = new SashForm(horizontalSash, SWT.VERTICAL);
leftVerticalSash.setLayout(new FillLayout());
NavigationGraph graph = new NavigationGraph(model);
focusControl = graph.createControl(leftVerticalSash);
ClausesModel resultsModel = new ClausesModel(model.getOntology(), model.getAxiomMapper());
ClausesComponent resultsComponent = new ClausesComponent(resultsModel);
resultsComponent.createControls(leftVerticalSash);
leftVerticalSash.setWeights(new int[] {60, 40}); // NOCHECKSTYLE
I can reproduce with HEAD. No need to change the text, get the CU from comment 1, select the lines of comment 2 and try to extract a method --> NPE Move to JDT/UI as the problem is located in SelectionAwareSourceRangeComputer.initializeRanges() which set the field fDocumentPortionToScan to null when entering but use it after at line 94 where the NPE occurs *** This bug has been marked as a duplicate of bug 312867 *** |