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

Bug 317005

Summary: Generating an XML report results in invalid XML
Product: z_Archived Reporter: Lars Gjesse Kjellberg <lgk>
Component: TPTPAssignee: Mike Reid <mikereid>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed472
Attachments:
Description Flags
Patch none

Description Lars Gjesse Kjellberg CLA 2010-06-16 03:11:43 EDT
Build Identifier: M20100211-1343

In my case, the <classes> element that comes below the <packages> element contains an extra quote at the end of the last attribute. Here is an example:


<packages name="Demant.Gearbox.DataModel.Metax.Java.Impl" baseTime="34.83105659484863" cumulativeTime="34.83105659484863" calls="500965" totalSize="0" totalInstances="0" collectedSize="0" collectedInstances="0">
    <classes name="MetaxRTMainModuleImpl" id="3139" loadTime="27.673044681549072" baseTime="34.83105659484863" cumulativeTime="34.83105659484863" calls="500965" totalSize="0" totalInstances="0" collectedSize="0" collectedInstances="0" loadedBy="0" sourceInfo="MetaxRTMainModuleImpl.java"">
      <methods name="-clinit-" id="113883" signature="()" baseTime="2.8133392333984375E-5" cumulativeTime="2.8133392333984375E-5" calls="1"/>
      <methods name="MetaxRTMainModuleImpl" id="113884" signature="()" baseTime="3.24249267578125E-5" cumulativeTime="3.24249267578125E-5" calls="1"/>



Note that the value for the 'sourceInfo' attribute seemingly ends with 2 quotes.


Reproducible: Always

Steps to Reproduce:
1. Create a new profiling configuration
2. Select Execution Time analysis
3. Run trace
4. Export report as XML
Comment 1 Kathy Chan CLA 2010-08-24 11:16:13 EDT
Deferring to TPTP 4.7.2.
Comment 2 Mike Reid CLA 2010-09-28 10:06:53 EDT
Created attachment 179743 [details]
Patch

The extra quote occurs because the opening of the quote is guarded by conditional logic, but the closing of the quote is written unconditionally. Fix is simply to move the closing quote into the conditional logic so they are paired if the logic is taken, or neither of them are written if not.

Patch attached.
Comment 3 Mike Reid CLA 2010-11-01 11:07:33 EDT
Patch checked into HEAD.
Comment 4 Mike Reid CLA 2011-01-14 15:11:00 EST
Verified in TPTP-4.7.2-201101121900.
Comment 5 Kathy Chan CLA 2011-02-11 14:56:37 EST
Closing in TPTP 4.7.2 on behalf of the originator/owner.
Comment 6 Kathy Chan CLA 2011-02-11 14:57:29 EST
Closing.