Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314145

Summary: NPE renaming extension part of file name
Product: [WebTools] Java Server Faces Reporter: Gerry Kessler <gerry.kessler>
Component: CoreAssignee: Cameron Bateman <cameron.bateman>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cameron.bateman, david_williams, raghunathan.srinivasan
Version: 3.2Flags: cameron.bateman: pmc_approved?
david_williams: pmc_approved+
raghunathan.srinivasan: pmc_approved? (naci.dai)
deboer: pmc_approved+
raghunathan.srinivasan: pmc_approved? (neil.hauge)
raghunathan.srinivasan: pmc_approved? (kaloyan)
raghunathan.srinivasan: review+
Target Milestone: 3.2 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Attachments:
Description Flags
Combine code and test fix so that rename of files in the web content root are ignored if other than the resource folder. none

Description Gerry Kessler CLA 2010-05-24 13:13:13 EDT
Steps:
1) Create DWP w/JSF 2.0 facet
2) Create PAGE.html with xhtml content
3) Close page editor
4) Rename to PAGE.xhtml

Result: File is renamed, but there is also an exception.

java.lang.NullPointerException
at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.CompositeComponentTaglibLocator$ResourceLocatorChangeListener.handleRemove(CompositeComponentTaglibLocator.java:57)
at org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.CompositeComponentTaglibLocator$ResourceLocatorChangeListener.changed(CompositeComponentTaglibLocator.java:47)
at org.eclipse.jst.jsf.designtime.internal.resources.JSFResourceChangeListener.changed(JSFResourceChangeListener.java:103)
at org.eclipse.jst.jsf.common.internal.locator.AbstractLocator.fireChangeEvent(AbstractLocator.java:152)
at org.eclipse.jst.jsf.designtime.internal.resources.AbstractJSFResourceLocator.fireChangeEvent(AbstractJSFResourceLocator.java:44)
at org.eclipse.jst.jsf.designtime.internal.resources.WorkspaceResourceManager$JSFResourceTracker.fireResourceInAccessible(WorkspaceResourceManager.java:225)
at org.eclipse.jst.jsf.common.internal.resource.ResourceTracker.acceptEvent(ResourceTracker.java:71)
at org.eclipse.jst.jsf.common.internal.resource.ResourceTracker.acceptEvent(ResourceTracker.java:1)
at org.eclipse.jst.jsf.common.internal.resource.AbstractLifecycleListener.fireLifecycleEvent(AbstractLifecycleListener.java:101)
at org.eclipse.jst.jsf.common.internal.resource.LifecycleListener.handleRemove(LifecycleListener.java:316)
at org.eclipse.jst.jsf.common.internal.resource.LifecycleListener.handleChange(LifecycleListener.java:298)
at org.eclipse.jst.jsf.common.internal.resource.LifecycleListener.handleContainer(LifecycleListener.java:257)
at org.eclipse.jst.jsf.common.internal.resource.LifecycleListener.visit(LifecycleListener.java:242)
at org.eclipse.jst.jsf.common.internal.resource.LifecycleListener.resourceChanged(LifecycleListener.java:213)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:327)
at org.eclipse.core.internal.resources.Workspace.checkpoint(Workspace.java:381)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:263)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306)
at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:92)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:218)
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)
Comment 1 Cameron Bateman CLA 2010-05-24 17:10:38 EDT
Created attachment 169734 [details]
Combine code and test fix so that rename of files in the web content root are ignored if other than the resource folder.
Comment 2 Raghunathan Srinivasan CLA 2010-05-24 19:01:51 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug"
(requested by an adopter) please document it as such. 
This is a stop-ship bug. Renaming a HTML page is a common use case and should not throw exception.
* Is there a work-around? If so, why do you believe the work-around is
insufficient? 
No workaround.
* How has the fix been tested? Is there a test case attached to the bugzilla
record? Has a JUnit Test been added? 
Junit test attached.
* Give a brief technical overview. Who has reviewed this fix? 
See  comment 1.
* What is the risk associated with this fix?
low
Comment 3 Cameron Bateman CLA 2010-05-25 14:45:58 EDT
Patch committed to HEAD (3.2M3).