From 4237a64f4a05eb655224752e09b5c0876e82ada7 Mon Sep 17 00:00:00 2001 From: Jean-Christian Kouame Date: Mon, 23 Nov 2015 15:54:21 -0500 Subject: [PATCH] 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 --- .../tmf/ui/parsers/wizards/CustomTxtParserInputWizardPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.34.1