From 0d57407a724dd170a2ce32a442ab4af70bd5293d Mon Sep 17 00:00:00 2001 From: Jean-Christian Kouame Date: Mon, 23 Nov 2015 16:19:55 -0500 Subject: [PATCH] tmf : Avoid concatenating nonliterals in a StringBuffer Change-Id: Idc6a9804bc5f2b101a8ada406d7bbd362c1161c5 Signed-off-by: Jean-Christian Kouame Reviewed-on: https://git.eclipse.org/r/61072 Reviewed-by: Hudson CI Reviewed-by: Matthew Khouzam Reviewed-by: Bernd Hufmann Tested-by: Bernd Hufmann --- .../tracecompass/tmf/core/parsers/custom/CustomXmlTrace.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/parsers/custom/CustomXmlTrace.java b/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/parsers/custom/CustomXmlTrace.java index 8df4b1b105..6dac5bcc3d 100644 --- a/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/parsers/custom/CustomXmlTrace.java +++ b/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/parsers/custom/CustomXmlTrace.java @@ -458,7 +458,9 @@ public class CustomXmlTrace extends TmfTrace implements ITmfPersistentlyIndexabl if (!element.hasChildNodes()) { buffer.append(element.getNodeName()); } else if (element.getChildNodes().getLength() == 1 && element.getFirstChild().getNodeType() == Node.TEXT_NODE) { - buffer.append(element.getNodeName() + ":" + element.getFirstChild().getNodeValue().trim()); //$NON-NLS-1$ + buffer.append(element.getNodeName()); + buffer.append(':'); + buffer.append(element.getFirstChild().getNodeValue().trim()); } else { buffer.append(element.getNodeName()); buffer.append(" [ "); //$NON-NLS-1$ -- 2.34.1