Bug 294896 - Content model validation utility fails to handle large size documents
Summary: Content model validation utility fails to handle large size documents
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Gabriel Indik CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: performance, plan
Depends on: 288494 294895
Blocks:
  Show dependency tree
 
Reported: 2009-11-11 13:06 EST by Valentin Baciu CLA
Modified: 2010-01-15 10:06 EST (History)
3 users (show)

See Also:


Attachments
Ported patch (14.59 KB, patch)
2009-11-11 15:56 EST, Gabriel Indik CLA
no flags Details | Diff
JUnit test binary file (975 bytes, application/octet-stream)
2009-11-11 15:57 EST, Gabriel Indik CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Baciu CLA 2009-11-11 13:06:58 EST
+++ This bug was initially created as a clone of Bug #294895 +++

+++ This bug was initially created as a clone of Bug #288494 +++

The recursive method "validateElementList" in the "CMValidator" class is
sensitive to the size of its input parameters. To prevent stack overflow
problems, this method is only invoked (through the "validate" method in the
same class) if the number of child elements of the node to validate is less
than 500. The problem with this approach is that in large size documents, where
a given node can potentially have more than 500 children, the validation is not
performed. As a result, the "add child" context menu item stops working (in the
editor design view as well as the editor outline view). Content assist in the
source view is also affected.
Comment 1 Gabriel Indik CLA 2009-11-11 15:56:39 EST
Created attachment 151984 [details]
Ported patch

Includes fix and JUnit test
Comment 2 Gabriel Indik CLA 2009-11-11 15:57:47 EST
Created attachment 151985 [details]
JUnit test binary file

This binary file must be added to the "projecttestfiles" folder in the JUnit
plug-in.
Comment 3 Gabriel Indik CLA 2009-11-11 16:06:05 EST
Fix committed and released 200911112108 UTC.
Comment 4 Valentin Baciu CLA 2010-01-15 10:06:53 EST
Closing.