Bug 320530 - NPE trying to extract code into a local variable
Summary: NPE trying to extract code into a local variable
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2010-07-21 12:32 EDT by Olivier Thomann CLA
Modified: 2022-05-17 20:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2010-07-21 12:32:01 EDT
Using eclipse.buildId=I20100706-0800
java.version=1.6.0_20-ea
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_CA
Command-line arguments:  -os win32 -ws win32 -arch x86 -console,

I got this exception:
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory$FragmentFactory.createFragment(ASTFragmentFactory.java:181)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory$FragmentForSubPartBySourceRangeFactory.createFragment(ASTFragmentFactory.java:166)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory$FragmentForSubPartBySourceRangeFactory.createFragmentFor(ASTFragmentFactory.java:146)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory.createFragmentForSubPartBySourceRange(ASTFragmentFactory.java:110)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory.createFragmentForSourceRange(ASTFragmentFactory.java:85)
at org.eclipse.jdt.internal.corext.refactoring.code.ExtractTempRefactoring.getSelectedExpression(ExtractTempRefactoring.java:841)
at org.eclipse.jdt.internal.corext.refactoring.code.ExtractTempRefactoring.checkSelection(ExtractTempRefactoring.java:604)
at org.eclipse.jdt.internal.corext.refactoring.code.ExtractTempRefactoring.checkInitialConditions(ExtractTempRefactoring.java:577)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Root exception:
java.lang.NullPointerException
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory$FragmentFactory.createFragment(ASTFragmentFactory.java:181)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory$FragmentForSubPartBySourceRangeFactory.createFragment(ASTFragmentFactory.java:166)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory$FragmentForSubPartBySourceRangeFactory.createFragmentFor(ASTFragmentFactory.java:146)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory.createFragmentForSubPartBySourceRange(ASTFragmentFactory.java:110)
at org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory.createFragmentForSourceRange(ASTFragmentFactory.java:85)
at org.eclipse.jdt.internal.corext.refactoring.code.ExtractTempRefactoring.getSelectedExpression(ExtractTempRefactoring.java:841)
at org.eclipse.jdt.internal.corext.refactoring.code.ExtractTempRefactoring.checkSelection(ExtractTempRefactoring.java:604)
at org.eclipse.jdt.internal.corext.refactoring.code.ExtractTempRefactoring.checkInitialConditions(ExtractTempRefactoring.java:577)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Unfortunately I could not reproduce. Might be a timing issue. I still report it in case I can reproduce it in the future.
Comment 1 Eclipse Genie CLA 2020-05-26 07:57:37 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-05-17 20:30:25 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.