| Summary: | Eventformatter does not correctly serialize the any properties. | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Paul Slauenwhite <paulslau> | ||||||||||||
| Component: | TPTP | Assignee: | Rohit Shetty <rohit.shetty> | ||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||
| Severity: | critical | ||||||||||||||
| Priority: | P1 | CC: | apnan, jkubasta, paulslau, rohit.shetty | ||||||||||||
| Version: | unspecified | Keywords: | plan | ||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | All | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
Since i1 development is closed, targeting to i2. Reassign to Project Lead for triage. Correcting target. Rohit can you please provide an input to this issue by end of Monday Nov 19, 2007. Created attachment 83388 [details]
Patch for the problem
Patch for the problem.
Created attachment 83389 [details]
Test case patch and updated testsuite files
Created attachment 83693 [details]
updated patch
Created attachment 83694 [details]
Tests - updated
Alex, Can you please review the patch and tests. Changing target to 4.5 i5 since it was not approved in 4.4.1. The code will be checked into the 4.5 stream in i5 since this defect is not neccessarily needed in M4. Checked in the fix as part of the consolidated patch for bug 207763. Did this fix make it into I5? The enclosed test class is still not normalizing or enclosing the content in a CDATA section (<![CDATA[any]]>). Created attachment 89501 [details]
Bugzilla_207806_Test.java
It looks like I forgot to check in the patch. Patch checked in. Verified in TPTP-4.5.0-200806070100. Closing. |
Eventformatter does not correctly serizalize the any properties. The any properties of the CommonBaseEvent and OtherSituration is not correctly serialized when it contains invalid XML (e.g. plain text with XML markup characters). The content should be wrapped as a CDATA section (<![CDATA[any]]>) or normalized. For example: EventFactoryHome eventFactoryHome = EventFactoryContext.getInstance().getEventFactoryHome("RuntimeEventXMLFileEventFactoryHomeImpl"); EventFactory eventFactory = eventFactoryHome.getAnonymousEventFactory(); CommonBaseEvent commonBaseEvent = eventFactory.createCommonBaseEvent(); commonBaseEvent.setCreationTimeAsLong(System.currentTimeMillis()); commonBaseEvent.setSeverity(((short) (60))); commonBaseEvent.setMsg("Hello World!"); Situation situation = eventFactory.createSituation(); situation.setOtherSituation("INTERNAL","<hello>world</hello>"); commonBaseEvent.setSituation(situation); CommonBaseEvent deserializedCommonBaseEvent = EventFormatter.eventFromCanonicalXML(EventFormatter.toCanonicalXMLString(commonBaseEvent)); System.out.println(EventFormatter.toCanonicalXMLString(deserializedCommonBaseEvent));