From: Jean-Christian Kouame Date: Mon, 23 Nov 2015 20:54:21 +0000 (-0500) Subject: tmf : Avoid concatenating nonliterals in a StringBuilder X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=4237a64f4a05eb655224752e09b5c0876e82ada7;p=deliverable%2Ftracecompass.git tmf : Avoid concatenating nonliterals in a StringBuilder Split the append() call in two separates calls Change-Id: Ib86731f916d76002570aad71f4976f6bfdf163a0 Signed-off-by: Jean-Christian Kouame Reviewed-on: https://git.eclipse.org/r/61070 Reviewed-by: Hudson CI Reviewed-by: Matthew Khouzam Tested-by: Matthew Khouzam --- diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/parsers/wizards/CustomTxtParserInputWizardPage.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/parsers/wizards/CustomTxtParserInputWizardPage.java index f541a85cd8..7b6808a7c3 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/parsers/wizards/CustomTxtParserInputWizardPage.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/parsers/wizards/CustomTxtParserInputWizardPage.java @@ -628,7 +628,8 @@ public class CustomTxtParserInputWizardPage extends WizardPage { StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { - sb.append(line + "\n"); //$NON-NLS-1$ + sb.append(line); + sb.append('\n'); } return sb.toString(); } catch (CoreException e) {