Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 207806 | Differences between
and this patch

Collapse All | Expand All

(-)src.cbe101/org/eclipse/hyades/logging/events/cbe/internal/util/EventHandler.java (-3 / +3 lines)
Lines 597-603 Link Here
597
                        //Do not persist white space (e.g. formatting characters)
597
                        //Do not persist white space (e.g. formatting characters)
598
                        // between elements:
598
                        // between elements:
599
                        if (anyElementCharacters.trim().length() > 0) {
599
                        if (anyElementCharacters.trim().length() > 0) {
600
                            ((CommonBaseEvent) (object)).addAny(XmlUtility.normalize(anyElementCharacters));
600
                            ((CommonBaseEvent) (object)).addAny(anyElementCharacters.trim());
601
                        }
601
                        }
602
                        
602
                        
603
                        if(eventListener != null){
603
                        if(eventListener != null){
Lines 619-628 Link Here
619
                            String currentAnyElement = otherSituation.getAny();
619
                            String currentAnyElement = otherSituation.getAny();
620
620
621
                            if ((currentAnyElement != null) && (currentAnyElement.trim().length() > 0)) {
621
                            if ((currentAnyElement != null) && (currentAnyElement.trim().length() > 0)) {
622
                                otherSituation.setAny(currentAnyElement.concat(XmlUtility.normalize(anyElementCharacters)));
622
                                otherSituation.setAny(currentAnyElement.concat(anyElementCharacters));
623
                            } 
623
                            } 
624
                            else {
624
                            else {
625
                                otherSituation.setAny(XmlUtility.normalize(anyElementCharacters));
625
                                otherSituation.setAny(anyElementCharacters.trim());
626
                            }
626
                            }
627
				        }					
627
				        }					
628
					}
628
					}
(-)src.events/org/eclipse/tptp/logging/events/cbe/util/EventFormatter.java (-6 / +6 lines)
Lines 2089-2097 Link Here
2089
							buffer.append("\t\t\t");
2089
							buffer.append("\t\t\t");
2090
						}
2090
						}
2091
2091
2092
						// Do NOT normalize since this string is assumed to be a
2092
			              // Normalizing since this string might not always be
2093
						// valid XML fragment:
2093
		                // a valid XML fragment: Bugzilla 207806
2094
						buffer.append(anyData);
2094
		                buffer.append(XmlUtility.normalize(anyData));
2095
					}
2095
					}
2096
2096
2097
					if (format) {
2097
					if (format) {
Lines 2127-2135 Link Here
2127
					buffer.append("\t");
2127
					buffer.append("\t");
2128
				}
2128
				}
2129
2129
2130
				// Do NOT normalize since this string is assumed to be a
2130
                // Normalizing since this string might not always be
2131
				// valid XML fragment:
2131
                // a valid XML fragment: Bugzilla 207806
2132
				buffer.append(anyElement);
2132
                buffer.append(XmlUtility.normalize(anyElement));
2133
			}
2133
			}
2134
		}
2134
		}
2135
2135
(-)src.cbe101/org/eclipse/hyades/logging/events/cbe/util/EventFormatter.java (-6 / +6 lines)
Lines 2091-2099 Link Here
2091
							buffer.append("\t\t\t");
2091
							buffer.append("\t\t\t");
2092
						}
2092
						}
2093
2093
2094
						// Do NOT normalize since this string is assumed to be a
2094
						// Normalizing since this string might not always be
2095
						// valid XML fragment:
2095
		                // a valid XML fragment: Bugzilla 207806
2096
						buffer.append(anyData);
2096
		                buffer.append(XmlUtility.normalize(anyData));
2097
					}
2097
					}
2098
2098
2099
					if (format) {
2099
					if (format) {
Lines 2129-2137 Link Here
2129
					buffer.append("\t");
2129
					buffer.append("\t");
2130
				}
2130
				}
2131
2131
2132
				// Do NOT normalize since this string is assumed to be a
2132
				// Normalizing since this string might not always be
2133
				// valid XML fragment:
2133
				// a valid XML fragment: Bugzilla 207806
2134
				buffer.append(anyElement);
2134
				buffer.append(XmlUtility.normalize(anyElement));
2135
			}
2135
			}
2136
		}
2136
		}
2137
2137
(-)src.events/org/eclipse/tptp/logging/events/cbe/internal/util/EventHandler.java (-2 / +2 lines)
Lines 1080-1086 Link Here
1080
1080
1081
                //Do not persist white space (e.g. formatting characters) between elements:
1081
                //Do not persist white space (e.g. formatting characters) between elements:
1082
                if (charactersBuffer.toString().trim().length() > 0) {
1082
                if (charactersBuffer.toString().trim().length() > 0) {
1083
                    commonBaseEvent.addAny(XmlUtility.normalize(charactersBuffer.toString()));
1083
                    commonBaseEvent.addAny(charactersBuffer.toString().trim());
1084
                }
1084
                }
1085
1085
1086
                if(eventListener != null){
1086
                if(eventListener != null){
Lines 1247-1253 Link Here
1247
    
1247
    
1248
                //Do not persist white space (e.g. formatting characters) between elements:
1248
                //Do not persist white space (e.g. formatting characters) between elements:
1249
                if (charactersBuffer.toString().trim().length() > 0) {
1249
                if (charactersBuffer.toString().trim().length() > 0) {
1250
                    otherSituation.setAny(XmlUtility.normalize(charactersBuffer.toString()));
1250
                    otherSituation.setAny(charactersBuffer.toString().trim());
1251
                }                    
1251
                }                    
1252
1252
1253
                ((Situation)(parsedElements.get(parsedElements.size() - 1))).setSituationType(otherSituation);
1253
                ((Situation)(parsedElements.get(parsedElements.size() - 1))).setSituationType(otherSituation);

Return to bug 207806