Bug 530379 - Refactoring causes NPE
Summary: Refactoring causes NPE
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-26 08:34 EST by Chris St. Onge CLA
Modified: 2022-10-20 04:38 EDT (History)
0 users

See Also:


Attachments
Stack traces for tasks 2 and 3 (12.76 KB, text/plain)
2018-01-26 08:34 EST, Chris St. Onge CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris St. Onge CLA 2018-01-26 08:34:29 EST
Created attachment 272425 [details]
Stack traces for tasks 2 and 3

Eclipse Oxygen.2 running with Java 9.0.4. Dynamic Web Project with Spring 5 with compiler set to Java 9.0.4.

Having issues performing various refactoring tasks:

Steps to reproduce:

Task 1 - Create a copy of a class in the same package with a new name
Steps:
1. Right click on the target class and select Copy.
2. Right click on the package of the target class and select Paste.
3. Name Conflict dialog comes up so change the name for the new class and press OK.
4. Copy dialog appears with the following text: "An exception has been caught while processing the refactoring 'Copy'. Reason: Exception does not provide a detail message" Clicking Details reveals "java.lang.NullPointerException". No stack trace and this is present in the logs:

!ENTRY org.eclipse.jdt.ui 4 10001 2018-01-26 09:20:03.796
!MESSAGE Internal Error
!STACK 0
java.lang.NullPointerException


Task 2 - Rename a class and update all references to it
Steps:
1. Right click on the target class and select Refactor->Rename.
2. Change the name of the class and leave the "Update References" checkbox checked and press OK (Note: if you uncheck "Update References", it will rename the class successfully).
3. Refactoring dialog comes up with the following text: "An unexpected exception occurred while performing the refactoring. See the error log for more details. See the error log for more details". There's only the OK button this time. See attached stack trace.

Task 3 - Move a class from one package to another
Steps:
1. Click and drag a class from one package to another.
2. Move dialog comes up. Leave "Update references..." checkbox checked and push OK (Note: again if you uncheck "Update references...", it will move successfully).
3. Refactoring dialog comes up with the following text: "An unexpected exception occurred while performing the refactoring. See the error log for more details. See the error log for more details". There's only the OK button this time. See attached stack trace.
Comment 1 Eclipse Genie CLA 2020-08-25 12:12:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2022-10-20 04:38:41 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.