This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 307924 - Error dialog when doing Save As on an XML File
Summary: Error dialog when doing Save As on an XML File
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsl (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.2 M7   Edit
Assignee: David Carver CLA
QA Contact: David Carver CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-01 14:34 EDT by Ian Tewksbury CLA
Modified: 2010-04-12 18:21 EDT (History)
0 users

See Also:


Attachments
Fix for NPE in Semantic Highlighting (13.01 KB, patch)
2010-04-01 16:34 EDT, David Carver CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2010-04-01 14:34:07 EDT
BUILD: I-3.2.0-20100401055753

STEPS:

1. Create a static web project
2. create an XML file
3. do a file->save as on the XML file saving it as a different file

RESULTS:
1. and error dialog appears saying:
"'Processing Dirty Regions' has encountered a problem.
An internal error occurred during: "Processing Dirty Regions""
2. A message is logged:

An internal error occurred during: "Processing Dirty Regions".
java.lang.NullPointerException
	at java.util.Arrays$ArrayList.<init>(Unknown Source)
	at java.util.Arrays.asList(Unknown Source)
	at org.eclipse.wst.xsl.ui.internal.style.XSLTagDelimsSemanticHighlighting.consumes(XSLTagDelimsSemanticHighlighting.java:47)
	at org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler.reconcile(SemanticHighlightingReconciler.java:125)
	at org.eclipse.wst.sse.ui.internal.reconcile.DocumentRegionProcessor.endProcessing(DocumentRegionProcessor.java:119)
	at org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor.run(DirtyRegionProcessor.java:682)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
3. This is reproducible 100% of the time
Comment 1 David Carver CLA 2010-04-01 16:34:56 EDT
Created attachment 163679 [details]
Fix for NPE in Semantic Highlighting

This fixes the NPE error, and also simplifies the code a bit.  Added a Unit Test to make sure we are getting the expected value when a region is Null.
Comment 2 David Carver CLA 2010-04-12 18:21:08 EDT
This has been fixed.