Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2016-04-21 17:11:13 -0400
committerGerrit Code Review @ Eclipse.org2016-04-21 18:49:32 -0400
commitccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30 (patch)
tree02575073de886a594454e26b7480127bf3f85303
parent8a2fd3307b261c0452f3ea08235a7d898a11a7b8 (diff)
downloadorg.eclipse.cdt-ccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30.tar.gz
org.eclipse.cdt-ccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30.tar.xz
org.eclipse.cdt-ccbab86d6cd5f9c6c6a2e53cd6505a95b45d6f30.zip
Bug 492200 - Replace StringBuffer with StringBuilder
There are many opportunities for replacing `StringBuffer` with `StringBuilder` provided that the type isn't visible from the public API and is used only in internal methods. Replace these where appropriate. Change-Id: I769ceb6eaee18d183fb0e00fa0d730651f8a7edb Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsConfigurationBuilder.java4
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java8
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java2
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java6
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java6
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java6
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/InlineDataRule.java8
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java10
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/AutotoolsUIPluginImages.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTML2TextReader.java8
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTMLTextPresenter.java8
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/MakeUIImages.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SingleCharReader.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SubstitutionTextReader.java8
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java10
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AbstractMakefile.java6
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Command.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Comment.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/GNUTargetRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/If.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifdef.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifeq.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifndef.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifneq.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Include.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/InferenceRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MacroDefinitionRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileAnnotationHover.java6
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileReader.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileTextHover.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Parent.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/SpecialRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StaticTargetRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StatusInfo.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java2
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/TargetRule.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/UnExport.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/VPath.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/preferences/AbstractEditorPreferencePage.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/InfoContext.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java10
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Comment.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/InferenceRule.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/SpecialRule.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/TargetRule.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/UnExport.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VPath.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java6
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/FunctionReferenceRule.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroDefinitionRule.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileTextHover.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java6
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/core/scannerconfig/CfgInfoContext.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescriptionGnuMakefileGenerator.java12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProcessLauncher.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperty.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java20
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/PathInfo.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java4
120 files changed, 300 insertions, 302 deletions
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsConfigurationBuilder.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsConfigurationBuilder.java
index 93216a963e..51b79a8061 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsConfigurationBuilder.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsConfigurationBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Red Hat Inc. and others.
+ * Copyright (c) 2012, 2016 Red Hat Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -91,7 +91,7 @@ public class AutotoolsConfigurationBuilder extends ACBuilder {
OutputStream cos = console.getOutputStream();
String errormsg = AutotoolsPlugin.getResourceString(BUILD_STOPPED);
- StringBuffer buf = new StringBuffer(errormsg);
+ StringBuilder buf = new StringBuilder(errormsg);
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("(").append(result.getMessage()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
index 09f3adf7e3..2076cfd12d 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
@@ -872,7 +872,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
"MakeGenerator.make.message", msgs)); //$NON-NLS-1$
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
// Launch command - main invocation
if (consoleStart)
@@ -968,7 +968,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
}
// Report either the success or failure of our mission
- buf = new StringBuffer();
+ buf = new StringBuilder();
if (errMsg != null && errMsg.length() > 0) {
String errorDesc = AutotoolsPlugin.getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
@@ -1172,7 +1172,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
"MakeGenerator.make.message", msgs)); //$NON-NLS-1$
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
// Launch command - main invocation
if (consoleStart)
@@ -1302,7 +1302,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
}
// Report either the success or failure of our mission
- buf = new StringBuffer();
+ buf = new StringBuilder();
if (errMsg != null && errMsg.length() > 0) {
String errorDesc = AutotoolsPlugin.getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
index 42ad8f0f91..f3e4162b8c 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
@@ -293,7 +293,7 @@ public class AutotoolsConfiguration implements IAConfiguration {
@Override
public String getToolParameters(String name) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
Option[] options = getChildOptions(name);
for (int i = 0; i < options.length; ++i) {
IConfigureOption option = getOption(options[i].getName());
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java
index e7ae6a328b..e2066d5e2b 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 Red Hat Inc.
+ * Copyright (c) 2011, 2016 Red Hat Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,14 +37,14 @@ public class FlagConfigureOption extends AbstractConfigurationOption {
@Override
public String getParameter() {
- StringBuffer parms = new StringBuffer();
+ StringBuilder parms = new StringBuilder();
// Multiple flags are designated by putting multiple flags together using "|" as delimiter
String[] flagNames = getValue().split("\\|"); //$NON-NLS-1$
String flagSeparator = "";
for (String flagName : flagNames) {
parms.append(flagSeparator);
flagSeparator = " "; //$NON-NLS-1$
- StringBuffer parm = new StringBuffer(flagName+"=\""); //$NON-NLS-1$
+ StringBuilder parm = new StringBuilder(flagName+"=\""); //$NON-NLS-1$
boolean haveParm = false;
if (isParmSet()) {
String separator = "";
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java
index 643cec366d..6f2979861b 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -135,7 +135,7 @@ public class AutoconfAnnotationHover implements IAnnotationHover, IAnnotationHov
* Formats a message as HTML text.
*/
private String formatSingleMessage(String message) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
HTMLPrinter.addPageProlog(buffer);
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
HTMLPrinter.addPageEpilog(buffer);
@@ -146,7 +146,7 @@ public class AutoconfAnnotationHover implements IAnnotationHover, IAnnotationHov
* Formats several message as HTML text.
*/
private String formatMultipleMessages(List<String> messages) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
HTMLPrinter.addPageProlog(buffer);
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(AutoconfEditorMessages.getString("AutoconfAnnotationHover.multipleMarkers"))); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java
index 2d7fb3c25d..9b110266c9 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 Red Hat, Inc.
+ * Copyright (c) 2006, 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,7 +37,7 @@ public class AutoconfMacroPartitionRule implements IPredicateRule {
protected static final int UNDEFINED = -1;
/** Buffer used for pattern detection */
- private StringBuffer fBuffer = new StringBuffer();
+ private StringBuilder fBuffer = new StringBuilder();
public AutoconfMacroPartitionRule(IToken inToken) {
token = inToken;
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java
index a47e469b27..71ddbfdca2 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 Red Hat, Inc.
+ * Copyright (c) 2006, 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,7 +34,7 @@ public class AutoconfMacroRule implements IRule {
protected static final int UNDEFINED = -1;
/** Buffer used for pattern detection */
- private StringBuffer fBuffer = new StringBuffer();
+ private StringBuilder fBuffer = new StringBuilder();
private String fStartingSequence;
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
index 95597165b4..4de4a5257e 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 Red Hat, Inc.
+ * Copyright (c) 2006, 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -41,7 +41,7 @@ public class AutoconfPartitioner extends FastPartitioner {
public void printPartitions(ITypedRegion[] partitions)
{
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < partitions.length; i++)
{
@@ -62,4 +62,4 @@ public class AutoconfPartitioner extends FastPartitioner {
}
System.out.print(buffer);
}
-} \ No newline at end of file
+}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/InlineDataRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/InlineDataRule.java
index 249701ec13..00e25146b1 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/InlineDataRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/InlineDataRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 Red Hat, Inc.
+ * Copyright (c) 2006, 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,7 +34,7 @@ public class InlineDataRule implements IRule {
protected static final int UNDEFINED = -1;
/** Buffer used for pattern detection */
- private StringBuffer fBuffer = new StringBuffer();
+ private StringBuilder fBuffer = new StringBuilder();
private String fStartingSequence = "<<";
@@ -45,7 +45,7 @@ public class InlineDataRule implements IRule {
// Confirm an EOL delimeter after already matching first delimeter character.
protected boolean confirmDelimeter(ICharacterScanner scanner, char[] delimeter) {
int c = scanner.read();
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append((char)c);
for (int i = 1; i < delimeter.length; ++i) {
if (c == delimeter[i]) {
@@ -76,7 +76,7 @@ public class InlineDataRule implements IRule {
}
char[][] lineDelimeters = scanner.getLegalLineDelimiters();
- StringBuffer endMarkerBuffer = new StringBuffer();
+ StringBuilder endMarkerBuffer = new StringBuilder();
if (c == '-') {
fBuffer.append((char)c);
c = scanner.read();
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java
index 9ce46407df..08d5264499 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Red Hat, Inc.
+ * Copyright (c) 2007, 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -42,7 +42,7 @@ public class AutoconfElement {
public String toString() {
String source = getSource();
if (source == null) {
- StringBuffer kids = new StringBuffer();
+ StringBuilder kids = new StringBuilder();
for (AutoconfElement kid : children) {
kids.append(kid.toString());
kids.append(","); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java
index 34cbdaa5a5..7ee2790fd3 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Red Hat, Inc. and others.
+ * Copyright (c) 2007, 2016 Red Hat, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -952,7 +952,7 @@ public class AutoconfParser {
// track the exact tokens forming the start and end of an argument, defaulting
// to the borders of the parentheses and commas if no text is included.
- StringBuffer argBuffer = new StringBuffer();
+ StringBuilder argBuffer = new StringBuilder();
AutoconfMacroArgumentElement arg = new AutoconfMacroArgumentElement();
while (true) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java
index d67ec0e685..2b230cdc14 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 Nokia Corporation.
+ * Copyright (c) 2008, 2016 Nokia Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -146,7 +146,7 @@ public class AutoconfTokenizer {
}
startOffset = offset;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
// check EOL
if (ch == '\r' || ch == '\n') {
@@ -251,7 +251,7 @@ public class AutoconfTokenizer {
}
private Token parseWord(char ch) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(ch);
offset++;
@@ -306,7 +306,7 @@ public class AutoconfTokenizer {
private Token parseQuote() {
// read text, honoring nested quotes, but don't put the outermost quotes in the token
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
int quoteLevel = 1;
// keep reading until the close quote
@@ -338,7 +338,7 @@ public class AutoconfTokenizer {
startOffset = offset;
offset++;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
char ch = 0;
while (offset < chars.length) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/AutotoolsUIPluginImages.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/AutotoolsUIPluginImages.java
index 51253739d2..1f363256fb 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/AutotoolsUIPluginImages.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/AutotoolsUIPluginImages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -94,7 +94,7 @@ public class AutotoolsUIPluginImages {
}
private static URL makeIconFileURL(String prefix, String name) {
- StringBuffer buffer= new StringBuffer(prefix);
+ StringBuilder buffer= new StringBuilder(prefix);
buffer.append(name);
try {
return new URL(fgIconBaseURL, buffer.toString());
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTML2TextReader.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTML2TextReader.java
index 30370c5267..a17d803d02 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTML2TextReader.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTML2TextReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -172,7 +172,7 @@ public class HTML2TextReader extends SubstitutionTextReader {
*/
private String processHTMLTag() throws IOException {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int ch;
do {
@@ -241,7 +241,7 @@ public class HTML2TextReader extends SubstitutionTextReader {
* A '&' has been read. Process a entity
*/
private String processEntity() throws IOException {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int ch= nextChar();
while (Character.isLetterOrDigit((char)ch) || ch == '#') {
buf.append((char) ch);
@@ -256,4 +256,4 @@ public class HTML2TextReader extends SubstitutionTextReader {
buf.append((char) ch);
return buf.toString();
}
-} \ No newline at end of file
+}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTMLTextPresenter.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTMLTextPresenter.java
index 14884f9ddc..2d1b3bfa49 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTMLTextPresenter.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/HTMLTextPresenter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -68,7 +68,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
}
}
- private void append(StringBuffer buffer, String string, TextPresentation presentation) {
+ private void append(StringBuilder buffer, String string, TextPresentation presentation) {
int length= string.length();
buffer.append(string);
@@ -97,7 +97,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
GC gc= new GC(display);
try {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
int maxNumberOfLines= Math.round((float)maxHeight / gc.getFontMetrics().getHeight());
fCounter= 0;
@@ -157,7 +157,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
}
}
- private String trim(StringBuffer buffer, TextPresentation presentation) {
+ private String trim(StringBuilder buffer, TextPresentation presentation) {
int length= buffer.length();
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/MakeUIImages.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/MakeUIImages.java
index 261eb1383c..c1d851f234 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/MakeUIImages.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/MakeUIImages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -111,7 +111,7 @@ public class MakeUIImages {
}
private static URL makeIconFileURL(String prefix, String name) {
- StringBuffer buffer = new StringBuffer(prefix);
+ StringBuilder buffer = new StringBuilder(prefix);
buffer.append(name);
try {
return new URL(fgIconBaseURL, buffer.toString());
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SingleCharReader.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SingleCharReader.java
index 50eef2a416..0daf960e6a 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SingleCharReader.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SingleCharReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -55,7 +55,7 @@ public abstract class SingleCharReader extends Reader {
* Gets the content as a String
*/
public String getString() throws IOException {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int ch;
while ((ch= read()) != -1) {
buf.append((char)ch);
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SubstitutionTextReader.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SubstitutionTextReader.java
index d691dfc41a..05a341163e 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SubstitutionTextReader.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/SubstitutionTextReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,13 +30,13 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
private int fCharAfterWhiteSpace;
private boolean fReadFromBuffer;
- private StringBuffer fBuffer;
+ private StringBuilder fBuffer;
private int fIndex;
protected SubstitutionTextReader(Reader reader) {
fReader= reader;
- fBuffer= new StringBuffer();
+ fBuffer= new StringBuilder();
fIndex= 0;
fReadFromBuffer= false;
fCharAfterWhiteSpace= -1;
@@ -127,4 +127,4 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
fBuffer.setLength(0);
fIndex= 0;
}
-} \ No newline at end of file
+}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java
index 7160ef529f..82ddf6719d 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 Red Hat Inc..
+ * Copyright (c) 2009, 2016 Red Hat Inc..
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -128,7 +128,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
String currentWord = st.nextToken().trim();
if (currentWord.startsWith("'")) { //$NON-NLS-1$
- StringBuffer tmpTarget = new StringBuffer();
+ StringBuilder tmpTarget = new StringBuilder();
while (!currentWord.endsWith("'")) { //$NON-NLS-1$
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
if (!st.hasMoreTokens()) {
@@ -144,7 +144,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
}
if (currentWord.startsWith("\"")) { //$NON-NLS-1$
- StringBuffer tmpTarget = new StringBuffer();
+ StringBuilder tmpTarget = new StringBuilder();
while (!currentWord.endsWith("\"")) { //$NON-NLS-1$
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
if (!st.hasMoreTokens()) {
@@ -286,7 +286,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
IConfiguration cfg = info.getDefaultConfiguration();
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
String[] consoleHeader = new String[3];
consoleHeader[0] = actionName;
@@ -338,7 +338,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
// some Linux shells such as dash. Using sh -c will
// work on all Linux
// POSIX-compliant shells.
- StringBuffer command1 = new StringBuffer(strippedCommand);
+ StringBuilder command1 = new StringBuilder(strippedCommand);
for (String arg : argumentList) {
command1.append(" " + arg);
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AbstractMakefile.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AbstractMakefile.java
index 981e054fb2..f3c3a12540 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AbstractMakefile.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AbstractMakefile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -202,8 +202,8 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
int len = line.length();
boolean foundDollar = false;
boolean inMacro = false;
- StringBuffer buffer = new StringBuffer();
- StringBuffer macroName = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
+ StringBuilder macroName = new StringBuilder();
for (int i = 0; i < len; i++) {
char c = line.charAt(i);
switch(c) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java
index bd418b2939..0aff20eeb5 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ class AutomakeMacroDefinitionRule implements IPredicateRule {
private static final int ERROR_STATE = 5;
private IToken token;
- private StringBuffer buffer = new StringBuffer();
+ private StringBuilder buffer = new StringBuilder();
protected IToken defaultToken;
public AutomakeMacroDefinitionRule(IToken token, IToken defaultToken) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java
index 3ddc51ea7b..86bb102ba7 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 Red Hat Inc..
+ * Copyright (c) 2006, 2016 Red Hat Inc..
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -73,7 +73,7 @@ public class AutomakeTextHover implements ITextHover, ITextHoverExtension {
case '?':
preReqs = target.getPrerequisites();
if (preReqs != null && preReqs.length > 0) {
- StringBuffer toReturn = new StringBuffer();
+ StringBuilder toReturn = new StringBuilder();
toReturn.append(preReqs[0]);
for (int i = 1; i < preReqs.length; i++) {
toReturn.append(" " + preReqs[i]);
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Command.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Command.java
index 86e33a18ba..6e81d2d296 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Command.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Command.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -80,7 +80,7 @@ public class Command extends Directive implements ICommand {
@Override
public String toString() {
- StringBuffer cmd = new StringBuffer();
+ StringBuilder cmd = new StringBuilder();
cmd.append( '\t');
if (getPrefix() != 0) {
cmd.append(getPrefix());
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Comment.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Comment.java
index adbac16a4c..cf005d1059 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Comment.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Comment.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ public class Comment extends Directive implements IComment {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(POUND_STRING).append(comment).append('\n');
return buffer.toString();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/GNUTargetRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/GNUTargetRule.java
index 38c73058e8..72d871ecc7 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/GNUTargetRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/GNUTargetRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -39,7 +39,7 @@ public class GNUTargetRule extends TargetRule {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget().toString());
buffer.append(':');
String[] reqs = getNormalPrerequisites();
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/If.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/If.java
index 2839bcddbd..8b4ceeddfc 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/If.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/If.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -59,7 +59,7 @@ public class If extends Conditional implements IAutomakeConditional, ICommand {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IF);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IF);
sb.append(' ').append(getVariable());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifdef.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifdef.java
index f31075745b..86600ac7da 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifdef.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifdef.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ public class Ifdef extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFDEF);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFDEF);
sb.append(' ').append(getVariable());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifeq.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifeq.java
index de29b95ed9..5c629e827b 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifeq.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifeq.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ public class Ifeq extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFEQ);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFEQ);
sb.append(' ').append(getConditional());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifndef.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifndef.java
index 135d93b339..72a1d7088a 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifndef.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifndef.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ public class Ifndef extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNDEF);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNDEF);
sb.append(' ').append(getVariable());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifneq.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifneq.java
index 988fd5554c..fafe5b3181 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifneq.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Ifneq.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ public class Ifneq extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNEQ);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNEQ);
sb.append(' ').append(getConditional());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Include.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Include.java
index aebd0b04ac..58be1108a5 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Include.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Include.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ public class Include extends Parent implements IInclude {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_INCLUDE);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_INCLUDE);
for (int i = 0; i < filenames.length; i++) {
sb.append(' ').append(filenames[i]);
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/InferenceRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/InferenceRule.java
index 3c1dd31b49..02eda8c4e5 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/InferenceRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/InferenceRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ public class InferenceRule extends Rule {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget().toString()).append(":\n"); //$NON-NLS-1$
ICommand[] cmds = getCommands();
for (int i = 0; i < cmds.length; i++) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MacroDefinitionRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MacroDefinitionRule.java
index 10f901adca..e17f3afa07 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MacroDefinitionRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MacroDefinitionRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 QNX Software Systems and others.
+ * Copyright (c) 2002, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ class MacroDefinitionRule implements IPredicateRule {
private static final int ERROR_STATE = 5;
private IToken token;
- private StringBuffer buffer = new StringBuffer();
+ private StringBuilder buffer = new StringBuilder();
protected IToken defaultToken;
public MacroDefinitionRule(IToken token, IToken defaultToken) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileAnnotationHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileAnnotationHover.java
index f5a48c2352..d44c34d37f 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileAnnotationHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileAnnotationHover.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -148,7 +148,7 @@ public class MakefileAnnotationHover implements IAnnotationHover, IAnnotationHov
* Formats a message as HTML text.
*/
private String formatSingleMessage(String message) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
HTMLPrinter.addPageProlog(buffer);
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
HTMLPrinter.addPageEpilog(buffer);
@@ -159,7 +159,7 @@ public class MakefileAnnotationHover implements IAnnotationHover, IAnnotationHov
* Formats several message as HTML text.
*/
private String formatMultipleMessages(List<String> messages) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
HTMLPrinter.addPageProlog(buffer);
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(AutoconfEditorMessages.getString("AutoconfAnnotationHover.multipleMarkers"))); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileReader.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileReader.java
index 5638c7228e..f66ff9582a 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileReader.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public class MakefileReader extends LineNumberReader {
@Override
public String readLine() throws IOException {
boolean done = false;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
boolean escapedLine = false;
boolean escapedCommand = false;
while (!done) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileTextHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileTextHover.java
index 66eb990b32..021c86071a 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileTextHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/MakefileTextHover.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -64,7 +64,7 @@ public class MakefileTextHover implements ITextHover {
statements = new IMacroDefinition[0];
}
// iterate over all the different categories
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < statements.length; i++) {
if (i > 0) {
buffer.append("\n"); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Parent.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Parent.java
index 50d71df279..8f4ebd7457 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Parent.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/Parent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -63,7 +63,7 @@ public abstract class Parent extends Directive implements IParent {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
IDirective[] directives = getDirectives();
for (int i = 0; i < directives.length; i++) {
sb.append(directives[i]);
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/SpecialRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/SpecialRule.java
index c72c5b2391..9272a9f14f 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/SpecialRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/SpecialRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ public abstract class SpecialRule extends Rule implements ISpecialRule {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(target).append(':');
String[] reqs = getPrerequisites();
for (int i = 0; i < reqs.length; i++) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StaticTargetRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StaticTargetRule.java
index cb48adfcd6..6c3afddbe4 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StaticTargetRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StaticTargetRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public class StaticTargetRule extends InferenceRule implements IInferenceRule {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget()).append(':');
String pattern = getTargetPattern();
if (pattern != null && pattern.length() > 0) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StatusInfo.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StatusInfo.java
index 5754ee9f1b..4443373fba 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StatusInfo.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StatusInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -112,7 +112,7 @@ public class StatusInfo implements IStatus {
*/
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("StatusInfo "); //$NON-NLS-1$
if (fSeverity == OK) {
buf.append("OK"); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java
index 88de0e6787..fb41f719ac 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java
@@ -248,7 +248,7 @@ public class StringMatcher {
Vector<String> temp = new Vector<>();
int pos= 0;
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
while (pos < fLength) {
char c= fPattern.charAt(pos++);
switch (c) {
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/TargetRule.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/TargetRule.java
index 3675686b7b..165275367e 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/TargetRule.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/TargetRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -53,7 +53,7 @@ public class TargetRule extends Rule implements ITargetRule {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget().toString());
buffer.append(':');
String[] reqs = getPrerequisites();
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/UnExport.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/UnExport.java
index e62b6b00bd..4cafb23831 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/UnExport.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/UnExport.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,7 +23,7 @@ public class UnExport extends Directive implements IUnExport {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
sb.append(' ').append(variable);
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/VPath.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/VPath.java
index 21c14c9b0e..a42fb3d9ca 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/VPath.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/VPath.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ public class VPath extends Directive implements IVPath {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_VPATH);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_VPATH);
if (pattern != null && pattern.length() > 0) {
sb.append(' ').append(pattern);
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/preferences/AbstractEditorPreferencePage.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/preferences/AbstractEditorPreferencePage.java
index 0040cbadbe..b0ec4a16e0 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/preferences/AbstractEditorPreferencePage.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/preferences/AbstractEditorPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 QNX Software Systems and others.
+ * Copyright (c) 2002, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -296,7 +296,7 @@ public abstract class AbstractEditorPreferencePage extends PreferencePage implem
protected String loadPreviewContentFromFile(String filename) {
String line;
String separator= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- StringBuffer buffer= new StringBuffer(512);
+ StringBuilder buffer= new StringBuilder(512);
BufferedReader reader= null;
try {
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java
index 782d7d0138..dee5b2451d 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 Red Hat Inc.
+ * Copyright (c) 2009, 2016 Red Hat Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -105,7 +105,7 @@ public class AutotoolsCategoryPropertyOptionPage extends
@Override
protected String createList(String[] arg0) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (String item : arg0) {
sb.append(item);
sb.append("\\s"); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
index 43ede5821b..c6e37a7a4d 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
@@ -288,7 +288,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
}
private static String getIndexedInfoFromDocument(String name, Document document) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (document != null && name != null) {
Element elem = document.getElementById(name);
@@ -300,7 +300,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
Node n = nl.item(i);
String nodeName = n.getNodeName();
if (nodeName.equals("prototype")) { //$NON-NLS-1$
- StringBuffer prototype = new StringBuffer();
+ StringBuilder prototype = new StringBuilder();
++prototypeCount;
if (prototypeCount == 1) {
buffer.append(" (");
@@ -364,7 +364,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
Node n2 = macroAttrs.getNamedItem("id"); //$NON-NLS-1$
if (n2 != null) {
String name = n2.getNodeValue();
- StringBuffer parms = new StringBuffer();
+ StringBuilder parms = new StringBuilder();
NodeList macroChildren = macro.getChildNodes();
for (int j = 0; j < macroChildren.getLength(); ++j) {
Node x = macroChildren.item(j);
@@ -540,7 +540,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
try {
styleSheetURL= FileLocator.toFileURL(styleSheetURL);
try (BufferedReader reader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()))) {
- StringBuffer buffer= new StringBuffer(200);
+ StringBuilder buffer= new StringBuilder(200);
String line= reader.readLine();
while (line != null) {
buffer.append(line);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/InfoContext.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/InfoContext.java
index 5ee92830a5..9844a58a65 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/InfoContext.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/InfoContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -79,7 +79,7 @@ public final class InfoContext {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if(fProject != null)
buf.append(fProject.toString());
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
index edf799e460..6c4bf619dd 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
@@ -340,7 +340,7 @@ public class BuildInfoFactory {
@Override
public void setErrorParsers(String[] parsers) throws CoreException {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0; i < parsers.length; i++) {
buf.append(parsers[i]).append(';');
}
@@ -377,7 +377,7 @@ public class BuildInfoFactory {
protected Map<String, String> decodeMap(String value) {
Map<String, String> map = new HashMap<>();
if (value != null) {
- StringBuffer envStr = new StringBuffer(value);
+ StringBuilder envStr = new StringBuilder(value);
String escapeChars = "|\\"; //$NON-NLS-1$
char escapeChar = '\\';
try {
@@ -397,7 +397,7 @@ public class BuildInfoFactory {
}
ndx++;
}
- StringBuffer line = new StringBuffer(envStr.substring(0, ndx));
+ StringBuilder line = new StringBuilder(envStr.substring(0, ndx));
int lndx = 0;
while (lndx < line.length()) {
if (line.charAt(lndx) == '=') {
@@ -420,7 +420,7 @@ public class BuildInfoFactory {
}
protected String encodeMap(Map<String, String> values) {
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
for (Entry<String, String> entry : values.entrySet()) {
str.append(escapeChars(entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
str.append("="); //$NON-NLS-1$
@@ -431,7 +431,7 @@ public class BuildInfoFactory {
}
protected String escapeChars(String string, String escapeChars, char escapeChar) {
- StringBuffer str = new StringBuffer(string);
+ StringBuilder str = new StringBuilder(string);
for (int i = 0; i < str.length(); i++) {
if (escapeChars.indexOf(str.charAt(i)) != -1) {
str.insert(i, escapeChar);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java
index dab9d097c4..fcb9273c9a 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeRecon.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,7 +30,7 @@ public class MakeRecon extends OutputStream {
IProgressMonitor monitor;
OutputStream console;
MyList log;
- StringBuffer currentLine;
+ StringBuilder currentLine;
class MyList extends ArrayList<String> {
private static final long serialVersionUID = 1L;
@@ -68,7 +68,7 @@ public class MakeRecon extends OutputStream {
directory = workingDirectory;
monitor = mon;
console = cos;
- currentLine = new StringBuffer();
+ currentLine = new StringBuilder();
log = new MyList();
// Get the buffer log.
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
index d92e673a5a..7647a6efab 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -219,8 +219,8 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
int len = line.length();
boolean foundDollar = false;
boolean inMacro = false;
- StringBuffer buffer = new StringBuffer();
- StringBuffer macroName = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
+ StringBuilder macroName = new StringBuilder();
for (int i = 0; i < len; i++) {
char c = line.charAt(i);
switch(c) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java
index 44521f6ec2..c525816d04 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Command.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -80,7 +80,7 @@ public class Command extends Directive implements ICommand {
@Override
public String toString() {
- StringBuffer cmd = new StringBuffer();
+ StringBuilder cmd = new StringBuilder();
cmd.append( '\t');
if (getPrefix() != 0) {
cmd.append(getPrefix());
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Comment.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Comment.java
index c6c5ca9ef3..63127bd199 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Comment.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Comment.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ public class Comment extends Directive implements IComment {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(POUND_STRING).append(comment).append('\n');
return buffer.toString();
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/InferenceRule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/InferenceRule.java
index 385c8f73bc..f18ee49006 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/InferenceRule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/InferenceRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public class InferenceRule extends Rule {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget().toString()).append(":\n"); //$NON-NLS-1$
ICommand[] cmds = getCommands();
for (int i = 0; i < cmds.length; i++) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java
index 6561c73825..a595688812 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/MakefileReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public class MakefileReader extends LineNumberReader {
@Override
public String readLine() throws IOException {
boolean done = false;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
boolean escapedLine = false;
boolean escapedCommand = false;
while (!done) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
index 40572a81a0..01269bc529 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -78,7 +78,7 @@ public abstract class Parent extends Directive implements IParent {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
IDirective[] directives = getDirectives();
for (int i = 0; i < directives.length; i++) {
sb.append(directives[i]);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/SpecialRule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/SpecialRule.java
index 99c831e008..6226713c5d 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/SpecialRule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/SpecialRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ public abstract class SpecialRule extends Rule implements ISpecialRule {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(target).append(':');
String[] reqs = getPrerequisites();
for (int i = 0; i < reqs.length; i++) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/TargetRule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/TargetRule.java
index cb64e71522..4f3e15349a 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/TargetRule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/TargetRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -60,7 +60,7 @@ public class TargetRule extends Rule implements ITargetRule {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget().toString());
buffer.append(':');
String[] reqs = getPrerequisites();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java
index 1d0e350ec6..7397e46900 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -67,7 +67,7 @@ public class GNUMakefileValidator implements IMakefileValidator {
if (problemMarkerInfo.file != null) {
name = problemMarkerInfo.file.getName();
}
- StringBuffer sb = new StringBuffer(name);
+ StringBuilder sb = new StringBuilder(name);
sb.append(':').append(problemMarkerInfo.lineNumber).append(':').append(getSeverity(problemMarkerInfo.severity));
if (problemMarkerInfo.description != null) {
sb.append(':').append(problemMarkerInfo.description);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java
index 29182d9e01..c438c55e1b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUTargetRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -47,7 +47,7 @@ public class GNUTargetRule extends TargetRule {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget().toString());
buffer.append(':');
String[] reqs = getNormalPrerequisites();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java
index def0dd6bce..9bf1d8efc9 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifdef.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ public class Ifdef extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFDEF);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFDEF);
sb.append(' ').append(getVariable());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java
index da56885a31..13dfd3760d 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifeq.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ public class Ifeq extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFEQ);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFEQ);
sb.append(' ').append(getConditional());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java
index bd5a7813d2..55302f671d 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifndef.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ public class Ifndef extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNDEF);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNDEF);
sb.append(' ').append(getVariable());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java
index 807be457e2..cae80e685f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Ifneq.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ public class Ifneq extends Conditional {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNEQ);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNEQ);
sb.append(' ').append(getConditional());
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
index d9e67e8eed..2ec7b95db1 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,7 +37,7 @@ public class Include extends Parent implements IInclude {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_INCLUDE);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_INCLUDE);
for (int i = 0; i < filenames.length; i++) {
sb.append(' ').append(filenames[i]);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java
index 39c908a3a0..213d7ce0f7 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/StaticTargetRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -57,7 +57,7 @@ public class StaticTargetRule extends InferenceRule implements IInferenceRule {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getTarget()).append(':');
String pattern = getTargetPattern();
if (pattern != null && pattern.length() > 0) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/UnExport.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/UnExport.java
index 5b965a03ea..ec25354c3b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/UnExport.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/UnExport.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ public class UnExport extends Directive implements IUnExport {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
sb.append(' ').append(variable);
return sb.toString();
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VPath.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VPath.java
index 62c58e53a1..afa68bcfdc 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VPath.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/VPath.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ public class VPath extends Directive implements IVPath {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_VPATH);
+ StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_VPATH);
if (pattern != null && pattern.length() > 0) {
sb.append(' ').append(pattern);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
index 026ca0e5c4..54749734dd 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -348,7 +348,7 @@ public class CDataDiscoveredInfoCalculator {
if(fExts.length == 0)
return "<empty>"; //$NON-NLS-1$
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for(int i = 0; i < fExts.length; i++){
if(i != 0)
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
index 56d4aa7ccd..66cb0418a8 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -186,7 +186,7 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
protected String[][] tokenize(String line, boolean escapeInsideDoubleQuotes) {
ArrayList<String[]> commands= new ArrayList<String[]>();
ArrayList<String> tokens= new ArrayList<String>();
- StringBuffer token= new StringBuffer();
+ StringBuilder token= new StringBuilder();
final char[] input= line.toCharArray();
boolean nextEscaped= false;
@@ -283,14 +283,14 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
return commands.toArray(new String[commands.size()][]);
}
- private void endCommand(StringBuffer token, ArrayList<String> tokens, ArrayList<String[]> commands) {
+ private void endCommand(StringBuilder token, ArrayList<String> tokens, ArrayList<String[]> commands) {
endToken(token, tokens);
if (!tokens.isEmpty()) {
commands.add(tokens.toArray(new String[tokens.size()]));
tokens.clear();
}
}
- private void endToken(StringBuffer token, ArrayList<String> tokens) {
+ private void endToken(StringBuilder token, ArrayList<String> tokens) {
if (token.length() > 0) {
tokens.add(token.toString());
token.setLength(0);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
index c5948ee4d4..c5994a267d 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -103,7 +103,7 @@ public abstract class AbstractGCCBOPConsoleParserUtility {
public static IPath convertCygpath(IPath path) {
if (path.segmentCount() > 1 && path.segment(0).equals("cygdrive")) { //$NON-NLS-1$
- StringBuffer buf = new StringBuffer(2);
+ StringBuilder buf = new StringBuilder(2);
buf.append(Character.toUpperCase(path.segment(1).charAt(0)));
buf.append(':');
path = path.removeFirstSegments(2);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
index 3e33c4d5ee..cedf340d53 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2013 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -267,7 +267,7 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
if (column > 0) {
char driveLetter = path.charAt(column - 1);
if (Character.isLowerCase(driveLetter)) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (column - 1 > 0) {
sb.append(path.substring(0, column-1));
}
@@ -280,9 +280,9 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
return (new Path(path)).toString(); // convert separators to '/'
}
// lose "./" segments since they confuse the Path normalization
- StringBuffer buf = new StringBuffer(path);
+ StringBuilder buf = new StringBuilder(path);
int len = buf.length();
- StringBuffer newBuf = new StringBuffer(buf.length());
+ StringBuilder newBuf = new StringBuilder(buf.length());
int scp = 0; // starting copy point
int ssp = 0; // starting search point
int sdot;
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java
index 206852d762..ce66ce5ad1 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -70,7 +70,7 @@ public class SCDMakefileGenerator extends DefaultRunSIProvider {
resource.getProject(), ScannerInfoTypes.UNDISCOVERED_COMPILER_COMMAND);
if (commands != null && commands.size() > 0) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("# This is a generated file. Please do not edit."); //$NON-NLS-1$
buffer.append(DENDL);
buffer.append(".PHONY: all"); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
index d5a7bfb8bc..65c8615865 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,8 +51,8 @@ public class AddBuildTargetAction extends Action {
Shell shell = fOutliner.getControl().getShell();
ITargetRule[] rules = getTargetRules(fOutliner.getSelection());
if (file != null && rules.length > 0 && shell != null) {
- StringBuffer sbBuildName = new StringBuffer();
- StringBuffer sbMakefileTarget = new StringBuffer();
+ StringBuilder sbBuildName = new StringBuilder();
+ StringBuilder sbMakefileTarget = new StringBuilder();
for (ITargetRule rule : rules) {
String name = rule.getTarget().toString().trim();
if (sbBuildName.length() == 0) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
index 35521374bc..c5e1bf5c94 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 QNX Software Systems and others.
+ * Copyright (c) 2002, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -307,7 +307,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
protected String loadPreviewContentFromFile(String filename) {
String line;
String separator= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- StringBuffer buffer= new StringBuffer(512);
+ StringBuilder buffer= new StringBuilder(512);
BufferedReader reader= null;
try {
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/FunctionReferenceRule.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/FunctionReferenceRule.java
index 432f6352e2..07a1c8238d 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/FunctionReferenceRule.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/FunctionReferenceRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2015 Andrew Gvozdev and others.
+ * Copyright (c) 2013, 2016 Andrew Gvozdev and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,7 +19,7 @@ import org.eclipse.jface.text.rules.WordRule;
public class FunctionReferenceRule extends WordRule {
/** Buffer used for pattern detection. */
- private StringBuffer fBuffer= new StringBuffer();
+ private StringBuilder fBuffer= new StringBuilder();
private String startSeq;
private String endSeq;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroDefinitionRule.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroDefinitionRule.java
index b4fd6ea6a0..2d57b1d295 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroDefinitionRule.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroDefinitionRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2009 QNX Software Systems and others.
+ * Copyright (c) 2002, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ class MacroDefinitionRule implements IPredicateRule {
private static final int ERROR_STATE = 5;
private IToken token;
- private StringBuffer buffer = new StringBuffer();
+ private StringBuilder buffer = new StringBuilder();
protected IToken defaultToken;
public MacroDefinitionRule(IToken token, IToken defaultToken) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileTextHover.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileTextHover.java
index 444f524ad7..02434ee657 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileTextHover.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileTextHover.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -70,7 +70,7 @@ public class MakefileTextHover implements ITextHover {
statements = new IMacroDefinition[0];
}
// iterate over all the different categories
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i = 0; i < statements.length; i++) {
if (i > 0) {
buffer.append("\n"); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java
index f7bc22963e..b329f0b750 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java
@@ -287,7 +287,7 @@ public class MakeTargetDialog extends Dialog {
@Override
public void widgetSelected(SelectionEvent e) {
if (useBuilderCommandCheckBox.getSelection() == true) {
- StringBuffer cmd = new StringBuffer(builderCommand.toString());
+ StringBuilder cmd = new StringBuilder(builderCommand.toString());
if (builderArguments != null && !builderArguments.isEmpty()) {
cmd.append(" "); //$NON-NLS-1$
cmd.append(builderArguments);
@@ -398,7 +398,7 @@ public class MakeTargetDialog extends Dialog {
}
targetNameText.selectAll();
if (targetBuildCommand != null) {
- StringBuffer cmd = new StringBuffer(targetBuildCommand.toOSString());
+ StringBuilder cmd = new StringBuilder(targetBuildCommand.toOSString());
if (targetBuildArguments != null && !targetBuildArguments.isEmpty()) {
cmd.append(" "); //$NON-NLS-1$
cmd.append(targetBuildArguments);
@@ -433,7 +433,7 @@ public class MakeTargetDialog extends Dialog {
return true;
}
if (!isUsingBuilderCommand) {
- StringBuffer cmd = new StringBuffer(targetBuildCommand.toOSString()).append(targetBuildArguments);
+ StringBuilder cmd = new StringBuilder(targetBuildCommand.toOSString()).append(targetBuildArguments);
if (!getBuildLine().equals(cmd.toString())) {
return true;
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java
index 4f8e5095b9..6e73aa0c15 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java
@@ -175,7 +175,7 @@ public class SettingsBlock extends AbstractCOptionPage {
}
});
if (fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, null) != null) {
- StringBuffer cmd = new StringBuffer(fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "")); //$NON-NLS-1$
+ StringBuilder cmd = new StringBuilder(fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "")); //$NON-NLS-1$
if (!fBuildInfo.isDefaultBuildCmd()) {
String args = fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, ""); //$NON-NLS-1$
if (args != null && !args.isEmpty()) {
@@ -542,7 +542,7 @@ public class SettingsBlock extends AbstractCOptionPage {
else
stopOnErrorButton.setSelection(false);
if (info.getBuildCommand() != null) {
- StringBuffer cmd = new StringBuffer(info.getBuildCommand().toOSString());
+ StringBuilder cmd = new StringBuilder(info.getBuildCommand().toOSString());
if (!info.isDefaultBuildCmd()) {
String args = info.getBuildArguments();
if (args != null && !args.isEmpty()) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
index 3a68355c27..92948e84e9 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -146,7 +146,7 @@ public class BuildSystemTestHelper {
}
static public String arrayToString(Object[] arr){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append('[');
for(int i = 0; i < arr.length; i++) {
if(i != 0)
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java
index a824f96bab..6a6ddfa0f8 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,7 +30,7 @@ public class DiffUtil {
}
private static String createCommand(String location1, String location2){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(DIFF_CMD).append(" '").append(location1).append("' '").append(location2).append("'");
return buf.toString();
}
@@ -43,7 +43,7 @@ public class DiffUtil {
BufferedReader br;
br = new BufferedReader(new InputStreamReader(in));
String line;
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
try {
while ((line = br.readLine()) != null) {
buf.append("\n");
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
index b432b3a751..ad686f91bf 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -94,7 +94,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
@Override
public String toString() {
- StringBuffer buf = new StringBuffer("ExpectedChange(");
+ StringBuilder buf = new StringBuilder("ExpectedChange(");
buf.append(fResource);
buf.append(", ");
buf.append(convertKind(fKind));
@@ -111,7 +111,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
*/
private Hashtable<IPath, ExpectedChange> fExpectedChanges = new Hashtable<IPath, ExpectedChange>();
boolean fIsDeltaValid = true;
- private StringBuffer fMessage = new StringBuffer();
+ private StringBuilder fMessage = new StringBuilder();
/**
* The verifier can be in one of three states. In the initial
* state, the verifier is still receiving inputs via the
@@ -370,7 +370,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
if (changeFlags == 0) {
return "0";
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if ((changeFlags & IResourceDelta.CONTENT) != 0) {
changeFlags ^= IResourceDelta.CONTENT;
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
index c766e59f54..e2340881c1 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
@@ -83,7 +83,7 @@ public class Test30_2_CommandLineGenerator implements
// Generate the command line
int start = 0;
int stop = 0;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while( (start = commandLinePattern.indexOf( VAR_FIRST_CHAR, start )) >= 0 ) {
if( commandLinePattern.charAt( start + 1 ) != VAR_SECOND_CHAR ) {
sb.append(VAR_FIRST_CHAR);
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
index 6223f97c15..6a4f21fe61 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -245,7 +245,7 @@ public class ToolChainModificationTests extends TestCase {
s1.removeAll(s2);
s2.removeAll(s1c);
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("checking c1..\n");
boolean fail = checkEmpty(s1, buf);
buf.append("checking c2..\n");
@@ -255,7 +255,7 @@ public class ToolChainModificationTests extends TestCase {
fail(buf.toString());
}
- private boolean checkEmpty(Collection<? extends IBuildObject> c, StringBuffer buf){
+ private boolean checkEmpty(Collection<? extends IBuildObject> c, StringBuilder buf){
if(c.size() != 0){
buf.append("non-empty dump:\n");
for (IBuildObject bo : c)
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/core/scannerconfig/CfgInfoContext.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/core/scannerconfig/CfgInfoContext.java
index 5da3a79170..81d4e061d2 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/core/scannerconfig/CfgInfoContext.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/core/scannerconfig/CfgInfoContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -75,7 +75,7 @@ public final class CfgInfoContext{
public InfoContext toInfoContext(){
if(fContext == null){
IProject project = fCfg.isPreference() ? null : fCfg.getOwner().getProject();
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(fCfg.getId());
if(fRcInfo != null){
buf.append(DELIMITER);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
index a83ddf8ddb..eb2a13b6ed 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -347,7 +347,7 @@ public class PerFileSettingsCalculator {
if(fExts.length == 0)
return "<empty>"; //$NON-NLS-1$
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for(int i = 0; i < fExts.length; i++){
if(i != 0)
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java
index 22f27693c8..ffb70d9f02 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/buildmodel/BuildDescriptionManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 Intel Corporation and others.
+ * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -293,7 +293,7 @@ public class BuildDescriptionManager {
// IPath path = null;
IPath tmp = cwd;
- StringBuffer buf = null;
+ StringBuilder buf = null;
while(tmp.segmentCount() != 0){
if(tmp.isPrefixOf(location)){
IPath p = location.removeFirstSegments(tmp.segmentCount()).setDevice(null);
@@ -303,7 +303,7 @@ public class BuildDescriptionManager {
return new Path(buf.toString());
}
if(buf == null){
- buf = new StringBuffer();
+ buf = new StringBuilder();
buf.append("../"); //$NON-NLS-1$
} else {
buf.append("../"); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java
index 3198a69760..fd54bf9890 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 Wind River Systems and others.
+ * Copyright (c) 2010, 2016 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -225,7 +225,7 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
// Convert into env strings
List<String> strings= new ArrayList<String>(env.size());
for (Entry<String, String> entry : env.entrySet()) {
- StringBuffer buffer= new StringBuffer(entry.getKey());
+ StringBuilder buffer= new StringBuilder(entry.getKey());
buffer.append('=').append(entry.getValue());
strings.add(buffer.toString());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
index 97f9b697e6..4590524825 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
@@ -3714,7 +3714,7 @@ public class ManagedBuildManager extends AbstractCExtension {
}
if(prefix.segmentCount() > 0){
int diff = container.segmentCount() - prefix.segmentCount();
- StringBuffer buff = new StringBuffer();
+ StringBuilder buff = new StringBuilder();
while(diff-- > 0)
buff.append("../"); //$NON-NLS-1$
path = new Path(buff.toString()).append(contents.removeFirstSegments(prefix.segmentCount()));
@@ -3931,7 +3931,7 @@ public class ManagedBuildManager extends AbstractCExtension {
}
public static String fullPathToLocation(String path){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
return buf.append("${").append("workspace_loc:").append(path).append("}").toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java
index 1ef33b40bd..83a62ec836 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -185,6 +185,6 @@ public final class OptionStringValue {
@Override
public String toString() {
- return new StringBuffer().append("ov:").append(value.toString()).toString(); //$NON-NLS-1$
+ return new StringBuilder().append("ov:").append(value.toString()).toString(); //$NON-NLS-1$
}
-} \ No newline at end of file
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescriptionGnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescriptionGnuMakefileGenerator.java
index e35005b84a..74511ac005 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescriptionGnuMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildDescriptionGnuMakefileGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -122,7 +122,7 @@ public class BuildDescriptionGnuMakefileGenerator {
}
protected String createVarRef(String var){
- return new StringBuffer().append(VARREF_PREFIX).append(var).append(VARREF_SUFFIX).toString();
+ return new StringBuilder().append(VARREF_PREFIX).append(var).append(VARREF_SUFFIX).toString();
}
protected void write(Writer writer, IBuildStep step) throws CoreException, IOException {
@@ -162,7 +162,7 @@ public class BuildDescriptionGnuMakefileGenerator {
}
protected String toString(IBuildCommand cmd){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(cmd.getCommand());
String argsString = CDataUtil.arrayToString(cmd.getArgs(), SPACE);
if(argsString != null && argsString.length() != 0){
@@ -181,7 +181,7 @@ public class BuildDescriptionGnuMakefileGenerator {
}
protected String toString(IBuildResource[] rcs){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for(int i = 0; i < rcs.length; i++){
if(i != 0)
buf.append(SPACE);
@@ -208,7 +208,7 @@ public class BuildDescriptionGnuMakefileGenerator {
private String removeDotDotSlashes(String str){
int index = str.indexOf(DOT_DOT_SLASH, 0);
if(index != -1){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
int start = 0;
for(; index != -1; index = str.indexOf(DOT_DOT_SLASH, start)){
buf.append(str.substring(start, index));
@@ -223,7 +223,7 @@ public class BuildDescriptionGnuMakefileGenerator {
private String removeDotDotBackslashes(String str){
int index = str.indexOf(DOT_DOT_BACKSLASH, 0);
if(index != -1){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
int start = 0;
for(; index != -1; index = str.indexOf(DOT_DOT_BACKSLASH, start)){
buf.append(str.substring(start, index));
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
index 06defbe203..30bff49879 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildResource.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 Intel Corporation and others.
+ * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -237,7 +237,7 @@ public class BuildResource implements IBuildResource {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("BR "); //$NON-NLS-1$
IPath fullPath = getFullPath();
if(fullPath != null)
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java
index 023bf85e98..2ac5871c96 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildStep.java
@@ -262,7 +262,7 @@ public class BuildStep implements IBuildStep {
IBuildResource[] generated = fBuildDescription.getResources(true);
if(generated.length != 0){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for(int i = 0; i < generated.length; i++){
buf.append(' ');
@@ -383,7 +383,7 @@ public class BuildStep implements IBuildStep {
char prev = 0;
// int start = 0;
List<String> list = new ArrayList<String>();
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for(int i = 0; i < arr.length; i++){
char ch = arr[i];
switch(ch){
@@ -523,7 +523,7 @@ public class BuildStep implements IBuildStep {
if(list == null || list.length == 0)
return ""; // $NON-NLS-1$
- StringBuffer buf = new StringBuffer(list[0]);
+ StringBuilder buf = new StringBuilder(list[0]);
for(int i = 1; i < list.length; i++){
buf.append(delimiter).append(list[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
index 712027a2a1..4fe8091783 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/CommandBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 Intel Corporation and others.
+ * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -181,7 +181,7 @@ public class CommandBuilder implements IBuildModelBuilder {
}
protected String getCommandLine() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if (fCmd != null) {
buf.append(fCmd.getCommand().toOSString());
String args[] = fCmd.getArgs();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
index c58bdeae1e..2da809ebcf 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 Intel Corporation and others.
+ * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -55,7 +55,7 @@ public class DbgUtil {
}
public static String dumpType(IBuildIOType type){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("dumping type: "); //$NON-NLS-1$
buf.append(type.isInput() ? "INPUT" : "OUTPUT"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -66,7 +66,7 @@ public class DbgUtil {
}
public static String ioTypeResources(IBuildIOType type){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
IBuildResource rcs[] = type.getResources();
@@ -81,7 +81,7 @@ public class DbgUtil {
}
public static String dumpStep(IBuildStep step, boolean inputs) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("dumping step ").append(stepName(step)).append(inputs ? " inputs" : " outputs"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -107,7 +107,7 @@ public class DbgUtil {
}
public static String dumpResource(IBuildResource rc, boolean producer){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("dumping resource ").append(resourceName(rc)).append(producer ? " producer:" : " deps:"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProcessLauncher.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProcessLauncher.java
index 3d06f7ac53..5e5dfa3d13 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProcessLauncher.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/ProcessLauncher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Intel Corporation and others.
+ * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -54,7 +54,7 @@ public class ProcessLauncher {
* Returns command line in a single string
*/
public String getCommandLine() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if (cmd != null) {
for (int i = 0; i < cmd.length; i++) {
buf.append(cmd[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java
index 9eeef28a30..d4d510a380 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperties.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -107,7 +107,7 @@ public class BuildProperties implements IBuildProperties {
if(fInexistentProperties != null){
String inexistentProps = CDataUtil.arrayToString(fInexistentProperties.toArray(new String[fInexistentProperties.size()]), BuildPropertyManager.PROPERTIES_SEPARATOR);
if(props.length() != 0){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(props).append(BuildPropertyManager.PROPERTIES_SEPARATOR).append(inexistentProps);
} else {
props = inexistentProps;
@@ -123,7 +123,7 @@ public class BuildProperties implements IBuildProperties {
else if(size == 1)
return fPropertiesMap.values().iterator().next().toString();
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
Iterator<IBuildProperty> iter = fPropertiesMap.values().iterator();
buf.append(iter.next().toString());
for(;iter.hasNext();){
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperty.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperty.java
index a31c10b5ca..070e9e9202 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperty.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildproperties/BuildProperty.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -80,7 +80,7 @@ public class BuildProperty implements IBuildProperty{
}
public static String toString(String type, String value){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(type).append(BuildPropertyManager.PROPERTY_VALUE_SEPARATOR).append(value);
return buf.toString();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
index 662e3cc875..2b61d3e6ca 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
@@ -2491,7 +2491,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
String name = getName();
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
if(version != null && version.length() != 0){
- return new StringBuffer().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ return new StringBuilder().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
return name;
}
@@ -2700,7 +2700,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
} else if(ids.length == 0){
errorParserIds = EMPTY_STRING;
} else {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(ids[0]);
for(int i = 1; i < ids.length; i++){
buf.append(";").append(ids[i]); //$NON-NLS-1$
@@ -2730,7 +2730,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
} else {
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
if(version != null){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(name);
buf.append(" (v").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
name = buf.toString();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
index 4c0637b070..62a9ad867c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
@@ -791,7 +791,7 @@ public class CommonBuilder extends ACBuilder {
return msgs.get(0);
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(msgs.get(0));
for(int i = 1; i < size; i++){
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
@@ -807,7 +807,7 @@ public class CommonBuilder extends ACBuilder {
* @param configName
*/
private String createNoSourceMessage(int buildType, IStatus status, CfgBuildInfo bInfo) throws CoreException {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
String[] consoleHeader = new String[3];
String configName = bInfo.getConfiguration().getName();
String projName = bInfo.getProject().getName();
@@ -897,7 +897,7 @@ public class CommonBuilder extends ACBuilder {
}
}
} else if (result.getCode() == IStatus.ERROR){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(ManagedMakeMessages.getString("CommonBuilder.23")).append(NEWLINE); //$NON-NLS-1$
String message = result.getMessage();
if(message != null && message.length() != 0){
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
index 1739eb815a..bba687d816 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2014 IBM Corporation and others.
+ * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2290,7 +2290,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
} else if(ids.length == 0){
errorParserIds = EMPTY_STRING;
} else {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(ids[0]);
for(int i = 1; i < ids.length; i++){
buf.append(";").append(ids[i]); //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
index e048bfe97c..3f36ef9006 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
@@ -360,7 +360,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
*/
private void emitNoSourceMessage(int buildType, IStatus status, String configName) throws CoreException {
try {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
IConsole console = CCorePlugin.getDefault().getConsole();
console.start(getProject());
ConsoleOutputStream consoleOutStream = console.getOutputStream();
@@ -614,7 +614,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
status = ManagedMakeMessages.getFormattedString("ManagedMakeBuilder.message.clean.deleting.output", buildDir.getName()); //$NON-NLS-1$
monitor.subTask(status);
workspace.delete(new IResource[]{buildDir}, true, monitor);
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
// write to the console
IConsole console = CCorePlugin.getDefault().getConsole();
console.start(getProject());
@@ -627,7 +627,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
buf.append(ManagedMakeMessages.getFormattedString(CONSOLE_HEADER, consoleHeader)).append(NEWLINE);
consoleOutStream.write(buf.toString().getBytes());
consoleOutStream.flush();
- buf = new StringBuffer();
+ buf = new StringBuilder();
// Report a successful clean
String successMsg = ManagedMakeMessages.getFormattedString(BUILD_FINISHED, getProject().getName());
buf.append(successMsg).append(NEWLINE);
@@ -920,7 +920,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
monitor.subTask(ManagedMakeMessages.getFormattedString(MAKE, msgs));
// Get a build console for the project
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
IConsole console = CCorePlugin.getDefault().getConsole();
console.start(project);
ConsoleOutputStream consoleOutStream = console.getOutputStream();
@@ -1048,7 +1048,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
isuptodate = true;
// Report that the build was up to date, and thus nothing needs to be built
String uptodateMsg = ManagedMakeMessages.getFormattedString(NOTHING_BUILT, project.getName());
- buf = new StringBuffer();
+ buf = new StringBuilder();
buf.append(NEWLINE);
buf.append(uptodateMsg).append(NEWLINE);
// Write message on the console
@@ -1129,7 +1129,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
}
// Report either the success or failure of our mission
- buf = new StringBuffer();
+ buf = new StringBuilder();
if (errMsg != null && errMsg.length() > 0) {
buf.append(errMsg).append(NEWLINE);
} else {
@@ -1231,7 +1231,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
builder = new DescriptionBuilder(des, buildIncrementaly, resumeOnErr, null);
// Get a build console for the project
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
console = CCorePlugin.getDefault().getConsole();
console.start(currentProject);
consoleOutStream = console.getOutputStream();
@@ -1280,7 +1280,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
long t2 = System.currentTimeMillis();
// Report either the success or failure of our mission
- buf = new StringBuffer();
+ buf = new StringBuilder();
switch(status){
case IBuildModelBuilder.STATUS_OK:
@@ -1335,7 +1335,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
monitor.subTask(ManagedMakeMessages.getResourceString(MARKERS));
addBuilderMarkers(epm);
} else {
- buf = new StringBuffer();
+ buf = new StringBuilder();
buf.append(ManagedMakeMessages.getFormattedString(NOTHING_BUILT, getProject().getName())).append(NEWLINE);
consoleOutStream.write(buf.toString().getBytes());
consoleOutStream.flush();
@@ -1343,7 +1343,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
} catch (Exception e) {
if(consoleOutStream != null){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
String errorDesc = ManagedMakeMessages.getResourceString(BUILD_ERROR);
buf.append(errorDesc).append(NEWLINE);
buf.append("(").append(e.getLocalizedMessage()).append(")").append(NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java
index 93927ac1b9..67529585dc 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/InputType.java
@@ -613,7 +613,7 @@ public class InputType extends BuildObject implements IInputType {
if (array.length == 0)
return ""; //$NON-NLS-1$
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(array[0]);
for (int i = 1; i < array.length; i++){
buf.append(separator).append(array[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
index a62d60de05..39cfb460d3 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
@@ -115,7 +115,7 @@ public class ManagedCommandLineGenerator implements
private String stringArrayToString( String[] array ) {
if( array == null || array.length <= 0 ) return ""; // $NON-NLS-1$
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for( int i = 0; i < array.length; i++ )
sb.append( array[i] + WHITESPACE );
return sb.toString().trim();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java
index 968dde722e..0152f9474a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MapStorageElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -190,7 +190,7 @@ public class MapStorageElement implements ICStorageElement {
char escapeChar = '\\';
for(int i = 0; i < list.size(); i++){
- StringBuffer line = new StringBuffer(list.get(i));
+ StringBuilder line = new StringBuilder(list.get(i));
int lndx = 0;
while (lndx < line.length()) {
if (line.charAt(lndx) == '=') {
@@ -213,7 +213,7 @@ public class MapStorageElement implements ICStorageElement {
public static List<String> decodeList(String value) {
List<String> list = new ArrayList<String>();
if (value != null) {
- StringBuffer envStr = new StringBuffer(value);
+ StringBuilder envStr = new StringBuilder(value);
String escapeChars = "|\\"; //$NON-NLS-1$
char escapeChar = '\\';
try {
@@ -233,7 +233,7 @@ public class MapStorageElement implements ICStorageElement {
}
ndx++;
}
- StringBuffer line = new StringBuffer(envStr.substring(0, ndx));
+ StringBuilder line = new StringBuilder(envStr.substring(0, ndx));
/* int lndx = 0;
while (lndx < line.length()) {
if (line.charAt(lndx) == '=') {
@@ -258,7 +258,7 @@ public class MapStorageElement implements ICStorageElement {
public static String encodeMap(Map<String, String> values) {
Iterator<Entry<String, String>> entries = values.entrySet().iterator();
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
while (entries.hasNext()) {
Entry<String, String> entry = entries.next();
str.append(escapeChars(entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
@@ -270,7 +270,7 @@ public class MapStorageElement implements ICStorageElement {
}
public static String encodeList(List<String> values) {
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
Iterator<String> entries = values.iterator();
while (entries.hasNext()) {
String entry = entries.next();
@@ -281,7 +281,7 @@ public class MapStorageElement implements ICStorageElement {
}
public static String escapeChars(String string, String escapeChars, char escapeChar) {
- StringBuffer str = new StringBuffer(string);
+ StringBuilder str = new StringBuilder(string);
for (int i = 0; i < str.length(); i++) {
if (escapeChars.indexOf(str.charAt(i)) != -1) {
str.insert(i, escapeChar);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
index b6d25d12fc..08ddaba9c6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
@@ -2289,7 +2289,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
String name = getName();
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
if(version != null && version.length() != 0){
- return new StringBuffer().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ return new StringBuilder().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
return name;
}
@@ -2500,7 +2500,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
} else if(ids.length == 0){
errorParserIds = EMPTY_STRING;
} else {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(ids[0]);
for(int i = 1; i < ids.length; i++){
buf.append(";").append(ids[i]); //$NON-NLS-1$
@@ -2517,7 +2517,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
} else {
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
if(version != null){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(name);
buf.append(" (v").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
name = buf.toString();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
index cd68e94657..73af0f0456 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
@@ -479,7 +479,7 @@ public class ToolReference implements IToolReference {
@Override
public String getToolFlags() throws BuildException {
// Get all of the options
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
IOption[] opts = getOptions();
for (int index = 0; index < opts.length; index++) {
IOption option = opts[index];
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java
index fc0017d2ec..29549e5e10 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildEntryStorage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -316,7 +316,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
if (path.segmentCount() != 0 && "..".equals(path.segment(0))) { //$NON-NLS-1$
projPath = path.removeFirstSegments(1).toString();
} else {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(getBuildDitName()).append('/').append(info.getUnresolvedPath());
projPath = buf.toString();
}
@@ -332,7 +332,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
if (path.segmentCount() != 0 && getBuildDitName().equals(path.segment(0))) {
projPath = path.removeFirstSegments(1).toString();
} else {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("../").append(info.getUnresolvedPath()); //$NON-NLS-1$
projPath = buf.toString();
}
@@ -476,7 +476,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
String result;
boolean checkQuote = true;
if (entry.getKind() == ICSettingEntry.MACRO && entry.getValue().length() > 0) {
- result = new StringBuffer(entry.getName()).append('=').append(entry.getValue()).toString();
+ result = new StringBuilder(entry.getName()).append('=').append(entry.getValue()).toString();
} else if (entry instanceof ICLanguageSettingPathEntry) {
IOptionPathConverter converter = fLangData.getTool().getOptionPathConverter();
if (converter instanceof IReverseOptionPathConverter) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
index 5553e64d24..d073385528 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
@@ -77,10 +77,10 @@ public class BuildLanguageData extends CLanguageData {
// typeId = extType.getId();
// else
// typeId = inType.getId();
- fId = inType.getId();//new StringBuffer(fTool.getId()).append(".").append(typeId).toString();
+ fId = inType.getId();//new StringBuilder(fTool.getId()).append(".").append(typeId).toString();
} else {
fInputType = null;
- fId = new StringBuffer(fTool.getId()).append(".").append("languagedata").toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ fId = new StringBuilder(fTool.getId()).append(".").append("languagedata").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
// fDiscoveredInfo = new ProfileInfoProvider(this);
@@ -139,7 +139,7 @@ public class BuildLanguageData extends CLanguageData {
String optValue = entry.getName();
if(entry.getKind() == ICLanguageSettingEntry.MACRO){
String macroValue = entry.getValue();
- StringBuffer buf = new StringBuffer(optValue).append('=').append(macroValue);
+ StringBuilder buf = new StringBuilder(optValue).append('=').append(macroValue);
optValue = buf.toString();
}
return optValue;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/PathInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/PathInfo.java
index c3fa139568..c18b4140a4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/PathInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/PathInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -100,7 +100,7 @@ class PathInfo {
}
String substr = str.substring(indx + 1);
String rStr = resolvedMacro == null || resolvedMacro.length() == 0 ?
- substr : new StringBuffer().append(resolvedMacro).append(subst).toString();
+ substr : new StringBuilder().append(resolvedMacro).append(subst).toString();
return isAbsolute(rStr, subst, out);
}
}
@@ -112,4 +112,4 @@ class PathInfo {
public SupplierBasedCdtVariableSubstitutor getSubstitutor(){
return fSubstitutor;
}
-} \ No newline at end of file
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java
index 35e7da66f7..868bb0479e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ObjectSet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -64,7 +64,7 @@ public class ObjectSet implements IObjectSet {
@SuppressWarnings("nls")
@Override
public String toString(){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(MatchObjectElement.TypeToStringAssociation.getAssociation(fObjectType).getString());
buf.append("[");
boolean isFirst = true;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java
index 4b6a3f6ea8..7a2cff762e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java
@@ -66,7 +66,7 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
* <tool_command> -P -MM -MG <tool_flags> $< >> $(@:%.<out_ext>=%.d)
*
*/
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
// Get what we need to create the dependency generation command
IConfiguration config = info.getDefaultConfiguration();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
index 88d31534b5..e97d8d2156 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
@@ -1018,12 +1018,10 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
// create rule of the form
// OBJS = $(macroName1: ../%.input1=%.output1) ... $(macroNameN: ../%.inputN=%.outputN)
- StringBuffer objectsBuffer = new StringBuffer();
- objectsBuffer.append(IManagedBuilderMakefileGenerator.WHITESPACE + "$(" + macroName + //$NON-NLS-1$
+ return IManagedBuilderMakefileGenerator.WHITESPACE + "$(" + macroName + //$NON-NLS-1$
IManagedBuilderMakefileGenerator.COLON + IManagedBuilderMakefileGenerator.ROOT +
IManagedBuilderMakefileGenerator.SEPARATOR + IManagedBuilderMakefileGenerator.WILDCARD +
- DOT + srcExtensionName + "=" + wildcard + OptDotExt + ")" ); //$NON-NLS-1$ //$NON-NLS-2$
- return objectsBuffer.toString();
+ DOT + srcExtensionName + "=" + wildcard + OptDotExt + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
index b3a7f54a22..0e5a4e29f8 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/templates/SimpleMakefileGenerator.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2007, 2011 QNX Software Systems and others.
+ * Copyright (c) 2007, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -98,7 +98,7 @@ public class SimpleMakefileGenerator extends ProcessRunner {
private static final String END = "}}"; //$NON-NLS-1$
private String replaceMacros(String fileContents, Map<String, String> valueStore) {
- StringBuffer buffer = new StringBuffer(fileContents);
+ StringBuilder buffer = new StringBuilder(fileContents);
for (String key : valueStore.keySet()) {
String pattern = START + key +END;
if (fileContents.indexOf(pattern)==-1)
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
index 82148bdfa3..08d0a965f0 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
@@ -300,7 +300,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
if(items == null)
return ""; // $NON-NLS-1$
- StringBuffer path = new StringBuffer(EMPTY_STR);
+ StringBuilder path = new StringBuilder(EMPTY_STR);
for (int i = 0; i < items.length; i++) {
path.append(items[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
index 48d2104885..c9a62333f2 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
@@ -264,7 +264,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
// boolean,string and enumerated
List<String> optionsList = new ArrayList<String>();
// additional options buffer
- StringBuffer addnOptions = new StringBuffer();
+ StringBuilder addnOptions = new StringBuilder();
// split all build options string
Vector<String> optionsArr = getOptionVector(alloptions);
for (String optionValue : optionsArr) {
@@ -374,7 +374,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
Object key = iterator.next();
String val = stringOptionsMap.get(key);
if (alloptions.indexOf(val) == -1) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
String[] vals = val.split(WHITESPACE);
for (int t = 0; t < vals.length; t++) {
if (alloptions.indexOf(vals[t]) != -1)
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
index 9e6bae401c..5a23fc3e61 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
@@ -299,7 +299,7 @@ public class FileListControlFieldEditor extends FieldEditor {
* @return
*/
private String createList(String[] items) {
- StringBuffer path = new StringBuffer();
+ StringBuilder path = new StringBuilder();
for (int i = 0; i < items.length; i++) {
path.append(items[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java
index 2b5f51219f..fb1446d9ab 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ManagedBuilderUIImages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 Rational Software Corporation and others.
+ * Copyright (c) 2002, 2016 Rational Software Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -114,7 +114,7 @@ public class ManagedBuilderUIImages {
}
private static URL makeIconFileURL(String prefix, String name) {
- StringBuffer buffer= new StringBuffer(prefix);
+ StringBuilder buffer= new StringBuilder(prefix);
buffer.append(name);
try {
return new URL(iconBaseURL, buffer.toString());
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
index a6242b49e8..f055869c3e 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -605,7 +605,7 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
*/
public static String getCompatibilityMessage(CompatibilityStatus cs) {
IConflict[] cons = cs.getConflicts();
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (int i=0; i<cons.length; i++) {
IBuildObject bo = cons[i].getBuildObject();
String n = (bo == null) ?

Back to the top