Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.core.aix/src/org/eclipse/cdt/internal/core/aix/ProcessList.java4
-rw-r--r--core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java8
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java36
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TestBase.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java8
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java18
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.java32
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.java28
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java28
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java8
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java6
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.java6
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java8
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java6
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.java4
-rw-r--r--core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/QualifiedTypeName.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/Flags.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CLibraryFileEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataSerializer.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelStatus.java10
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyElementsOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateFieldOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateIncludeOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateMethodOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateNamespaceOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateUsingOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplate.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplateDeclaration.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeFileEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroFileEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplateDeclaration.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java10
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulationInfo.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceRange.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Template.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/VariableTemplate.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/SegmentMatcher.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroDefinitionParser.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java10
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CDescriptorEvent.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/EFSExtensionProvider.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/IndentManipulation.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/PathEntryVariableChangeEvent.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/ConsoleOutputSniffer.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java2
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/WeakHashSet.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr32.java8
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr64.java8
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/CdtVariableResolver.java8
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java14
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java10
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PEArchive.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/DebugType.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java14
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java26
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/StabsReader.java6
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/TypeNumber.java6
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/ElfHelper.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO64.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/SOM.java8
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/XCoff32.java12
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/DisplayHelper.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java10
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java12
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java26
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java14
-rw-r--r--core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContext.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/TranslationUnitContextType.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleOutputTextStore.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/StatusInfo.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java26
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java16
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/LanguageVerifier.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ProposalFilterPreferencesUtil.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskConfigurationBlock.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/SnippetPreview.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/changes/DeleteFileChange.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SingleCharReader.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SubstitutionTextReader.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TabsToSpacesConverter.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/DefaultPhoneticHashProvider.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/StringMatcher.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/indexwizards/StringVariableSelectionDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractCPropertyTab.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java4
164 files changed, 495 insertions, 495 deletions
diff --git a/core/org.eclipse.cdt.core.aix/src/org/eclipse/cdt/internal/core/aix/ProcessList.java b/core/org.eclipse.cdt.core.aix/src/org/eclipse/cdt/internal/core/aix/ProcessList.java
index de76002331d..7c52fc63b02 100644
--- a/core/org.eclipse.cdt.core.aix/src/org/eclipse/cdt/internal/core/aix/ProcessList.java
+++ b/core/org.eclipse.cdt.core.aix/src/org/eclipse/cdt/internal/core/aix/ProcessList.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
@@ -59,7 +59,7 @@ public class ProcessList implements IProcessList {
processInfo = new ProcessInfo[pidFiles.length];
for (int i = 0; i < pidFiles.length; i++) {
File cmdLine = new File(pidFiles[i], "cmdline"); //$NON-NLS-1$
- StringBuffer line = new StringBuffer();
+ StringBuilder line = new StringBuilder();
FileReader reader = null;
try {
reader = new FileReader(cmdLine);
diff --git a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java
index 35e864d1222..740c64a9db9 100644
--- a/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.java
+++ b/core/org.eclipse.cdt.core.linux/src/org/eclipse/cdt/internal/core/linux/ProcessList.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
@@ -59,7 +59,7 @@ public class ProcessList implements IProcessList {
processInfo = new ProcessInfo[pidFiles.length];
for (int i = 0; i < pidFiles.length; i++) {
File cmdLine = new File(pidFiles[i], "cmdline"); //$NON-NLS-1$
- StringBuffer line = new StringBuffer();
+ StringBuilder line = new StringBuilder();
FileReader reader = null;
try {
reader = new FileReader(cmdLine);
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
index 054114e084c..fd16457206f 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2015 QNX Software Systems and others.
+ * Copyright (c) 2008, 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
@@ -260,7 +260,7 @@ public class ErrorParserManagerTest extends TestCase {
String id = addErrorParserExtension("test2", TestParser2.class);
epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
- StringBuffer buf = new StringBuffer("errorT: ");
+ StringBuilder buf = new StringBuilder("errorT: ");
for (int i = 0; i < 100; i++) {
buf.append("la la la la la "+i+" ");
}
@@ -296,7 +296,7 @@ public class ErrorParserManagerTest extends TestCase {
String id = addErrorParserExtension("test3", TestParser3.class);
epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
- StringBuffer buf = new StringBuffer("errorT: ");
+ StringBuilder buf = new StringBuilder("errorT: ");
for (int i = 0; i < 100; i++) {
buf.append("la la la la la "+i+" ");
}
@@ -325,7 +325,7 @@ public class ErrorParserManagerTest extends TestCase {
String id = addErrorParserExtension("test4", TestParser4.class);
epManager = new ErrorParserManager(null, markerGenerator, new String[] { id });
- StringBuffer buf = new StringBuffer("errorT: ");
+ StringBuilder buf = new StringBuilder("errorT: ");
output(buf.toString()+"\n");
end();
assertEquals(1, errorList.size());
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
index bc2ebac11df..52d90104c68 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems Ltd and others.
+ * Copyright (c) 2004, 2016 QNX Software Systems Ltd 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 abstract class GenericErrorParserTests extends TestCase {
}
protected String makeStringFromArray(String[] pieces, String sep) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0; i < pieces.length; i++) {
if (i != 0) {
buf.append(sep);
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java
index 24bd009c537..39b6fd708e0 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 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
@@ -266,7 +266,7 @@ public class BackwardCompatibilityTests extends BaseTestCase {
if(array == null)
return "null";
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append('[');
for(int i = 0; i < array.length; i++){
if(i != 0){
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java
index 076ded4d78e..9a0d2d85137 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.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
@@ -3103,7 +3103,7 @@ public class AST2CPPSpecTest extends AST2SpecTestBase {
// Not legal C++
// // public void test10_4s2b() throws Exception {
- // StringBuffer buffer = new StringBuffer();
+ // StringBuilder buffer = new StringBuilder();
// buffer.append("struct C {\n"); //$NON-NLS-1$
// buffer.append("virtual void f() { }=0; // illformed\n"); //$NON-NLS-1$
// buffer.append("};\n"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java
index 71ec93a7c7f..25856072616 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 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
@@ -1107,7 +1107,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testSimpleKRCTest1() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "int f(char x);\n" ); //$NON-NLS-1$
buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
@@ -1126,7 +1126,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testSimpleKRCTest2() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "int f();\n" ); //$NON-NLS-1$
buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
@@ -1145,7 +1145,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testSimpleKRCTest3() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "int const *f();\n" ); //$NON-NLS-1$
buffer.append( "int const *f(x) char x;\n" ); //$NON-NLS-1$
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
@@ -1164,7 +1164,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testKRC_1() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "int isroot (x, y) /* comment */ \n" ); //$NON-NLS-1$
buffer.append( "int x;\n" ); //$NON-NLS-1$
buffer.append( "int y;\n" ); //$NON-NLS-1$
@@ -1184,7 +1184,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testKRCWithTypes() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "typedef char c;\n" ); //$NON-NLS-1$
buffer.append( "int isroot (c);\n" ); //$NON-NLS-1$
buffer.append( "int isroot (x) \n" ); //$NON-NLS-1$
@@ -1216,7 +1216,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testKRC_monop_cards1() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#ifdef __STDC__\n" ); //$NON-NLS-1$
buffer.append( "#define __P(x) x\n" ); //$NON-NLS-1$
buffer.append( "#else\n" ); //$NON-NLS-1$
@@ -1265,7 +1265,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testKRC_monop_cards2() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "int\n" ); //$NON-NLS-1$
buffer.append( "getinp(prompt, list)\n" ); //$NON-NLS-1$
buffer.append( " const char *prompt, *const list[];\n" ); //$NON-NLS-1$
@@ -1298,7 +1298,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
public void testKRC_getParametersOrder() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "int f(a, b) int b,a;{}\n" ); //$NON-NLS-1$
String code = buffer.toString();
@@ -1315,7 +1315,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testKRC_Ethereal_1() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "struct symbol {\n" ); //$NON-NLS-1$
buffer.append( "int lambda;\n};\n" ); //$NON-NLS-1$
buffer.append( "struct lemon {\n" ); //$NON-NLS-1$
@@ -1361,7 +1361,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testBug86698() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "struct C;\n"); //$NON-NLS-1$
buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
buffer.append( "struct C {\n"); //$NON-NLS-1$
@@ -1383,7 +1383,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testLittleThings() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int a[3];\r\n"); //$NON-NLS-1$
buffer.append("int *b;\r\n"); //$NON-NLS-1$
buffer.append("int &c;\r\n"); //$NON-NLS-1$
@@ -1453,7 +1453,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testSimpleWindowsPreprocessorSelections() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
buffer.append("int x=0;\r\n"); //$NON-NLS-1$
@@ -1499,7 +1499,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testBug86993() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#define _BEGIN_STD_C extern \"C\" {\r\n"); //$NON-NLS-1$
buffer.append("#define _END_STD_C }\r\n"); //$NON-NLS-1$
buffer.append("_BEGIN_STD_C\r\n"); //$NON-NLS-1$
@@ -1524,7 +1524,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testBug86870() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#if VERSION == 1\r\n"); //$NON-NLS-1$
buffer.append("#define INCFILE \"vers1.h\"\r\n"); //$NON-NLS-1$
buffer.append("#elif VERSION == 2\r\n"); //$NON-NLS-1$
@@ -1573,7 +1573,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
public void testBug87179() throws Exception
{
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
buffer.append("int x=0;\r\n"); //$NON-NLS-1$
@@ -1601,7 +1601,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
}
public void testBug97301() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
// test2.h:
buffer.append("#ifndef _WINGDI_H\r\n"); //$NON-NLS-1$
buffer.append("#define _WINGDI_H\r\n"); //$NON-NLS-1$
@@ -1621,7 +1621,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
// test1.h:
- buffer = new StringBuffer();
+ buffer = new StringBuilder();
buffer.append("#ifdef RC_INVOKED\r\n"); //$NON-NLS-1$
buffer.append("#else\r\n"); //$NON-NLS-1$
buffer.append("#if !(defined NOGDI || defined _WINGDI_H)\r\n"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TestBase.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TestBase.java
index 21a5df87545..897be32253c 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TestBase.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TestBase.java
@@ -315,7 +315,7 @@ public class AST2TestBase extends BaseTestCase {
}
protected IASTExpression getExpressionFromStatementInCode(String code, ParserLanguage language) throws ParserException {
- StringBuffer buffer = new StringBuffer("void f() { "); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder("void f() { "); //$NON-NLS-1$
buffer.append("int x, y;\n"); //$NON-NLS-1$
buffer.append(code);
buffer.append(";\n}"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java
index 61612e33b8e..751a5bec602 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Institute for Software, HSR Hochschule fuer Technik
+ * Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -92,7 +92,7 @@ public class CommentTests extends AST2TestBase {
}
private String getHSource() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef CPPCLASS_H_\n");
buffer.append("#define CPPCLASS_H_\n");
buffer.append("/* A very cool class\n");
@@ -119,7 +119,7 @@ public class CommentTests extends AST2TestBase {
}
private String getCppSource() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("void CppClass()\n");
buffer.append("{\n");
buffer.append(" // Comment in cpp\n");
@@ -168,7 +168,7 @@ public class CommentTests extends AST2TestBase {
}
private String getCSource() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("//A little input/output programm\n");
buffer.append("int main(void){\n");
buffer.append(" int number = -1;\n");
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java
index ac01047d83e..0f3b16c10c3 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.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
@@ -54,7 +54,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
}
public void testBug97967() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
@@ -85,7 +85,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
public void testBug101875() throws Exception {
for (int i = 0; i < 4; ++i) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef _BLAH_H_\n"); //$NON-NLS-1$
buffer.append("#endif"); //$NON-NLS-1$
if (i > 1)
@@ -93,7 +93,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
if ((i % 2) == 1)
buffer.append("\n"); //$NON-NLS-1$
importFile("blah.h", buffer.toString()); //$NON-NLS-1$
- buffer = new StringBuffer();
+ buffer = new StringBuilder();
buffer.append("#include \"blah.h\"\n"); //$NON-NLS-1$
buffer.append("/**\n"); //$NON-NLS-1$
buffer.append(" * A type used by test functions.\n"); //$NON-NLS-1$
@@ -391,7 +391,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
public void testBug90851() throws Exception {
IFile imacro_file = importFile("macro.h", "#define BEAST 666\n"); //$NON-NLS-1$ //$NON-NLS-2$
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
@@ -426,7 +426,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
}
public void testIProblemLocation() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#include <not_found.h>\n"); //$NON-NLS-1$
buffer.append("int x,y,z;"); //$NON-NLS-1$
String code = buffer.toString();
@@ -454,7 +454,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
public void testBug97603() throws Exception {
IFile imacro_file = importFile("macro.h", "#define JEDEN 1\n#define DVA 2\n#define TRI 3\n"); //$NON-NLS-1$ //$NON-NLS-2$
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
@@ -495,7 +495,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
public void testBug97603_2() throws Exception {
IFile imacro_file1= importFile("macro1.h", "#define JEDEN 1\n");
IFile imacro_file2= importFile("macro2.h", "#define DVA 2\n#define TRI 3\n");
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
@@ -535,7 +535,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
public void testSystemInclude() throws Exception {
IFile incsh= importFile("incs.h", "");
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#include <incs.h>\n");
buffer.append("#include <../AST2BasedProjectMofo/incs.h>\n");
buffer.append("#define TARG <incs.h>\n");
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.java
index e84864cf753..a95e575283e 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.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
@@ -48,7 +48,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testObjectStyleMacroExpansionSimpleDeclarator() throws Exception
{
- StringBuffer buffer = new StringBuffer( "#define ABC D\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define ABC D\n" ); //$NON-NLS-1$
buffer.append( "int ABC;"); //$NON-NLS-1$
String code = buffer.toString();
for (ParserLanguage language : languages) {
@@ -74,7 +74,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testObjectMacroExpansionModestDeclarator() throws Exception
{
- StringBuffer buffer = new StringBuffer( "#define ABC * D\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define ABC * D\n" ); //$NON-NLS-1$
buffer.append( "int ABC;"); //$NON-NLS-1$
String code = buffer.toString();
for (ParserLanguage language : languages) {
@@ -121,7 +121,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testObjectMacroExpansionPartialDeclSpec() throws Exception
{
- StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define XYZ const\n"); //$NON-NLS-1$
buffer.append( "XYZ int var;"); //$NON-NLS-1$
String code = buffer.toString();
for (ParserLanguage language : languages) {
@@ -148,7 +148,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testObjectMacroExpansionNested() throws Exception
{
- StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define XYZ const\n"); //$NON-NLS-1$
buffer.append( "#define PO *\n"); //$NON-NLS-1$
buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
buffer.append( "int C_PO var;"); //$NON-NLS-1$
@@ -180,7 +180,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testObjectMacroExpansionComplex() throws Exception
{
- StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define XYZ const\n"); //$NON-NLS-1$
buffer.append( "#define PO *\n"); //$NON-NLS-1$
buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
buffer.append( "#define IT int\n"); //$NON-NLS-1$
@@ -232,7 +232,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testStdioBug() throws ParserException
{
- StringBuffer buffer = new StringBuffer( "#define _PTR void *\n"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define _PTR void *\n"); //$NON-NLS-1$
buffer.append( "#define __cdecl __attribute__ ((__cdecl__))\n" ); //$NON-NLS-1$
buffer.append( "#define _EXFUN(name, proto) __cdecl name proto\n"); //$NON-NLS-1$
buffer.append( "_PTR _EXFUN(memchr,(const _PTR, int, size_t));\n"); //$NON-NLS-1$
@@ -274,7 +274,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testMacroBindings() throws Exception
{
- StringBuffer buffer = new StringBuffer( "#define ABC def\n"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define ABC def\n"); //$NON-NLS-1$
buffer.append( "int ABC;\n"); //$NON-NLS-1$
buffer.append( "#undef ABC\n"); //$NON-NLS-1$
buffer.append( "#define ABC ghi\n"); //$NON-NLS-1$
@@ -311,7 +311,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testBug90978() throws Exception {
- StringBuffer buffer = new StringBuffer( "#define MACRO mm\n"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define MACRO mm\n"); //$NON-NLS-1$
buffer.append( "int MACRO;\n"); //$NON-NLS-1$
String code = buffer.toString();
for (ParserLanguage language : languages) {
@@ -332,7 +332,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
}
public void testBug94933() throws Exception {
- StringBuffer buffer = new StringBuffer( "#define API extern\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define API extern\n" ); //$NON-NLS-1$
buffer.append( "#define MYAPI API\n"); //$NON-NLS-1$
buffer.append( "MYAPI void func() {}" ); //$NON-NLS-1$
String code = buffer.toString();
@@ -345,7 +345,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testFunctionMacroExpansionWithNameSubstitution_Bug173637() throws Exception
{
- StringBuffer buffer = new StringBuffer( "#define PLUS5(x) (x+5)\n"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#define PLUS5(x) (x+5)\n"); //$NON-NLS-1$
buffer.append( "#define FUNCTION PLUS5 \n"); //$NON-NLS-1$
buffer.append( "int var= FUNCTION(1);"); //$NON-NLS-1$
String code = buffer.toString();
@@ -394,7 +394,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testBug186257() throws Exception {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("typedef char STR; \n"); //$NON-NLS-1$
sb.append("#define Nullstr Null(STR*) \n"); //$NON-NLS-1$
sb.append("#define Null(x) ((x)NULL) \n"); //$NON-NLS-1$
@@ -412,7 +412,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testArgumentExpansion() throws Exception {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("#define ADD(a,b, c) (a) + (b) + (c) \n"); //$NON-NLS-1$
sb.append("#define ONEYONENOE 111111 \n"); //$NON-NLS-1$
sb.append("#define TWO 2 \n"); //$NON-NLS-1$
@@ -431,7 +431,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testArgumentCapture() throws Exception {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("#define add(x,y) x + y \n"); //$NON-NLS-1$
sb.append("#define add2 add(x, \n"); //$NON-NLS-1$
sb.append("int x = add2 z); \n"); //$NON-NLS-1$
@@ -448,7 +448,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
public void testFunctionMacroNotCalled() throws Exception {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("#define FUNCTION(x) x \n"); //$NON-NLS-1$
sb.append("#define YO FUNCTION \n"); //$NON-NLS-1$
sb.append("int x = YO; \n"); //$NON-NLS-1$
@@ -464,7 +464,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
}
public void testBuildFunctionMacroName() throws Exception {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
sb.append("#define MAKEFUN(num) FUN ## num \n"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.java
index 69d88843aa6..96d7f26f1d7 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.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
@@ -373,7 +373,7 @@ public class DOMLocationTests extends AST2TestBase {
public void testSimplePreprocessorStatements() throws Exception
{
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#ifndef _APPLE_H_\n"); //$NON-NLS-1$
buffer.append( "#define _APPLE_H_\n"); //$NON-NLS-1$
buffer.append( "#undef _APPLE_H_\n"); //$NON-NLS-1$
@@ -397,7 +397,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void testBug162180() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
buffer.append( "int x;\n"); //$NON-NLS-1$
String code = buffer.toString();
@@ -422,7 +422,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void testBug162180_0() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
buffer.append( "#include <notfound1.h> \r\n"); //$NON-NLS-1$
buffer.append( "#include <notfound2.h> // more stuff \n"); //$NON-NLS-1$
@@ -445,7 +445,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void test162180_1() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#define xxx(!) int a\n"); // [0-20]
buffer.append( "int x;\n"); // [21-27]
buffer.append( "int x\\i;\n"); // [28-36]
@@ -468,7 +468,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void test162180_2() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#define ! x\n");
buffer.append( "int x;\n");
String code = buffer.toString();
@@ -486,7 +486,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void test162180_3() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#define nix(x) x\n");
buffer.append( "nix(y,z);");
buffer.append( "int x;\n");
@@ -505,7 +505,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void test162180_4() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "#include \"\"\n");
buffer.append( "#else\n");
buffer.append( "int x;\n");
@@ -540,7 +540,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void testBug86698_1() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "struct C;\n"); //$NON-NLS-1$
buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
buffer.append( "struct C {\n"); //$NON-NLS-1$
@@ -558,7 +558,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void testBug86698_2() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( "int f(int);\n"); //$NON-NLS-1$
buffer.append( "class C {\n"); //$NON-NLS-1$
buffer.append( "int i;\n"); //$NON-NLS-1$
@@ -583,7 +583,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void testBug157009_1() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef A\r\n#error X\r\n#else\r\n#error Y\r\n#endif");
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
@@ -593,7 +593,7 @@ public class DOMLocationTests extends AST2TestBase {
}
public void testBug157009_2() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#ifndef A\n#error X\n#else\n#error Y\n#endif");
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
@@ -604,7 +604,7 @@ public class DOMLocationTests extends AST2TestBase {
public void testBug171520() throws Exception {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171520
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int i = sizeof(int);");
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
IASTDeclaration[] decls= tu.getDeclarations();
@@ -624,7 +624,7 @@ public class DOMLocationTests extends AST2TestBase {
public void testBug120607() throws Exception {
// C/C++ Indexer rejects valid pre-processor directive
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120607
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#import \"include_once.h\"\n");
buffer.append("#warning \"deprecated include\"\n");
buffer.append("#line 5\n");
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java
index b46310006fa..62453e87038 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Institute for Software, HSR Hochschule fuer Technik
+ * Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -36,7 +36,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testPragma() throws Exception {
String msg = "GCC poison printf sprintf fprintf";
- StringBuffer buffer = new StringBuffer( "#pragma " + msg + "\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#pragma " + msg + "\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(1, st.length);
@@ -47,7 +47,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testElIf() throws Exception {
String cond = "2 == 2";
- StringBuffer buffer = new StringBuffer( "#if 1 == 2\n#elif " + cond + "\n#else\n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#if 1 == 2\n#elif " + cond + "\n#else\n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(4, st.length);
@@ -58,7 +58,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testIf() throws Exception {
String cond = "2 == 2";
- StringBuffer buffer = new StringBuffer( "#if " + cond + "\n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#if " + cond + "\n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(2, st.length);
@@ -69,7 +69,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testIfDef() throws Exception{
String cond = "SYMBOL";
- StringBuffer buffer = new StringBuffer( "#ifdef " + cond + "\n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#ifdef " + cond + "\n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(2, st.length);
@@ -80,7 +80,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testIfnDef() throws Exception{
String cond = "SYMBOL";
- StringBuffer buffer = new StringBuffer( "#ifndef " + cond + "\n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#ifndef " + cond + "\n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(2, st.length);
@@ -91,7 +91,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testError() throws Exception{
String msg = "Message";
- StringBuffer buffer = new StringBuffer( "#error " + msg + "\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#error " + msg + "\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(1, st.length);
@@ -102,7 +102,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testPragmaWithSpaces() throws Exception {
String msg = "GCC poison printf sprintf fprintf";
- StringBuffer buffer = new StringBuffer( "# pragma " + msg + " \n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "# pragma " + msg + " \n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(1, st.length);
@@ -113,7 +113,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testElIfWithSpaces() throws Exception {
String cond = "2 == 2";
- StringBuffer buffer = new StringBuffer( "#if 1 == 2\n# elif " + cond + " \n#else\n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#if 1 == 2\n# elif " + cond + " \n#else\n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(4, st.length);
@@ -124,7 +124,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testIfWithSpaces() throws Exception {
String cond = "2 == 2";
- StringBuffer buffer = new StringBuffer( "# if " + cond + " \n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "# if " + cond + " \n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(2, st.length);
@@ -135,7 +135,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testIfDefWithSpaces() throws Exception{
String cond = "SYMBOL";
- StringBuffer buffer = new StringBuffer( "# ifdef " + cond + " \n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "# ifdef " + cond + " \n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(2, st.length);
@@ -146,7 +146,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testIfnDefWithSpaces() throws Exception{
String cond = "SYMBOL";
- StringBuffer buffer = new StringBuffer( "# ifndef " + cond + "\t\n#endif\n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "# ifndef " + cond + "\t\n#endif\n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(2, st.length);
@@ -157,7 +157,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
public void testErrorWithSpaces() throws Exception{
String msg = "Message";
- StringBuffer buffer = new StringBuffer( "# error \t" + msg + " \n" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "# error \t" + msg + " \n" ); //$NON-NLS-1$
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false );
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
assertEquals(1, st.length);
@@ -167,7 +167,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
}
public void testMacroExpansion() throws Exception {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("#define add(a, b) (a) + (b) \n");
sb.append("int x = add(foo, bar); \n");
String code = sb.toString();
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java
index 4c6adb8278c..cab85528231 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2013 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -1620,7 +1620,7 @@ public class DOMSelectionParseTest extends DOMSelectionParseTestBase {
}
public void testBug64181() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("namespace Foo { // ** (A) **\n");
buffer.append("int bar;\n");
buffer.append("}\n");
@@ -1649,7 +1649,7 @@ public class DOMSelectionParseTest extends DOMSelectionParseTestBase {
}
public void testBug80823() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("class MyEggImpl {}; // line A\n");
buffer.append("#define MyChicken MyEggImpl\n");
buffer.append("MyChicken c; // line C\n");
@@ -1669,7 +1669,7 @@ public class DOMSelectionParseTest extends DOMSelectionParseTestBase {
}
public void testBug86993() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("#define _BEGIN_STD_C extern \"C\" {\n");
buffer.append("#define _END_STD_C }\n");
buffer.append("_BEGIN_STD_C\n");
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java
index 7d070366c09..fd9196bb6ec 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 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
@@ -1387,7 +1387,7 @@ public class QuickParser2Tests extends TestCase {
}
public void testBug68116() throws Exception {
- StringBuffer buffer = new StringBuffer("char dummy[] = \"0123456789");
+ StringBuilder buffer = new StringBuilder("char dummy[] = \"0123456789");
for (int i = 0; i < 5000; ++i)
buffer.append("0123456789");
buffer.append("\";");
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java
index 807b2918909..a75ec2b4830 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
+ * Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -22,8 +22,8 @@ import org.eclipse.jface.text.TextSelection;
public class TestSourceFile {
private static final String REPLACEMENT = ""; //$NON-NLS-1$
private String name;
- private StringBuffer source = new StringBuffer();
- private StringBuffer expectedSource = new StringBuffer();
+ private StringBuilder source = new StringBuilder();
+ private StringBuilder expectedSource = new StringBuilder();
private String separator = System.getProperty("line.separator"); //$NON-NLS-1$
private int selectionStart = -1;
private int selectionEnd = -1;
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.java
index 2ff3c82840a..d3cc8802257 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.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
@@ -230,7 +230,7 @@ public class InclusionTests extends PreprocessorTestsBase {
public void testBug91086() throws Exception {
IFile inclusion = importFile( "file.h", "#define FOUND 666\n" ); //$NON-NLS-1$ //$NON-NLS-2$
- StringBuffer buffer = new StringBuffer( "#include \"" ); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder( "#include \"" ); //$NON-NLS-1$
buffer.append( inclusion.getLocation().toOSString() );
buffer.append( "\"\n"); //$NON-NLS-1$
buffer.append( "int var = FOUND;\n"); //$NON-NLS-1$
@@ -251,7 +251,7 @@ public class InclusionTests extends PreprocessorTestsBase {
public void testBug156990() throws Exception {
IFile inclusion = importFile( "file.h", "ok" );
- StringBuffer buffer = new StringBuffer( "#include \"file.h\"" );
+ StringBuilder buffer = new StringBuilder( "#include \"file.h\"" );
IFile base = importFile( "base.cpp", buffer.toString() ); //$NON-NLS-1$
FileContent reader= FileContent.create(base);
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java
index a9a98d581b5..ee83ac3d8b8 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -691,7 +691,7 @@ public class LexerTests extends BaseTestCase {
for (int splices=0; splices<9; splices++) {
for (int trigraphs= 0; trigraphs<6; trigraphs++) {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
String input= useTrigraphs(ops.toCharArray(), trigraphs);
init(instertLineSplices(input, splices));
for (int token2 : tokens) {
@@ -727,7 +727,7 @@ public class LexerTests extends BaseTestCase {
int m1= splices%3;
int m2= (splices-m1)/3;
char[] c= input.toCharArray();
- StringBuffer result= new StringBuffer();
+ StringBuilder result= new StringBuilder();
for (int i = 0; i < c.length; i++) {
result.append(c[i]);
if (c[i]=='?' && i+2 < c.length && c[i+1] == '?' && TRIGRAPH_CHARS.indexOf(c[i+2]) >= 0) {
@@ -760,7 +760,7 @@ public class LexerTests extends BaseTestCase {
}
boolean yes= mode > 1;
- StringBuffer result= new StringBuffer();
+ StringBuilder result= new StringBuilder();
for (char c : input) {
int idx= TRIGRAPH_REPLACES_CHARS.indexOf(c);
if (idx > 0) {
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
index d080694ca20..4ba12d5bf43 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2014 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2016 Wind River Systems, 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
@@ -409,7 +409,7 @@ public class IndexBugsTests extends BaseTestCase {
public void test150906() throws Exception {
String fileName= "bug150906.c";
String varName= "arrayDataSize";
- StringBuffer content= new StringBuffer();
+ StringBuilder content= new StringBuilder();
content.append("unsigned char arrayData[] = {\n");
for (int i= 0; i < 1024 * 250 - 1; i++) {
content.append("0x00,");
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java
index c4dd14ee37d..b3fd85e62c9 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 Symbian Software Systems and others.
+ * Copyright (c) 2007, 2016 Symbian 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
@@ -75,7 +75,7 @@ public class DBPropertiesTests extends BaseTestCase {
public void testLong() throws Exception {
DBProperties ps = new DBProperties(db);
- StringBuffer largeValue = new StringBuffer();
+ StringBuilder largeValue = new StringBuilder();
for (int i= 0; i < Database.CHUNK_SIZE * 2; i += 64) {
largeValue.append("********");
ps.setProperty("key", largeValue.toString());
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java
index 8c181b81f57..810dc06b914 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.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
@@ -206,7 +206,7 @@ public class CProjectHelper {
private static String getMessage(IStatus status) {
- StringBuffer message = new StringBuffer("[");
+ StringBuilder message = new StringBuilder("[");
message.append(status.getMessage());
if (status.isMultiStatus()) {
IStatus children[] = status.getChildren();
@@ -460,4 +460,4 @@ public class CProjectHelper {
return folder;
}
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.java
index 87085c6afd0..a6c569335af 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.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
@@ -282,7 +282,7 @@ public class VerifyDialog extends TitleAreaDialog {
*/
private void handleFailure() {
IDialogTestPass test = _dialogTests[TEST_TYPE];
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
String label = test.label();
label = label.substring(0, label.indexOf("&")) +
label.substring(label.indexOf("&") + 1);
diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/QualifiedTypeName.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/QualifiedTypeName.java
index 54043b1c9cb..2cee2ee12b7 100644
--- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/QualifiedTypeName.java
+++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/core/browser/QualifiedTypeName.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2013 QNX Software Systems and others.
+ * Copyright (c) 2004, 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
@@ -118,7 +118,7 @@ public class QualifiedTypeName implements IQualifiedTypeName {
@Override
public String getFullyQualifiedName() {
if (fSegments.length > 0) {
- StringBuffer buf = new StringBuffer(fSegments.length * INITIAL_SEGMENT_LENGTH);
+ StringBuilder buf = new StringBuilder(fSegments.length * INITIAL_SEGMENT_LENGTH);
for (int i = 0; i < fSegments.length; ++i) {
if (i > 0) {
buf.append(QUALIFIER);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java
index ab19d6ee224..9da9f25d0bb 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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
@@ -105,7 +105,7 @@ public class CModelException extends CoreException {
*/
@Override
public String toString() {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
buffer.append("C Model Exception: "); //$NON-NLS-1$
if (getException() != null) {
if (getException() instanceof CoreException) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/Flags.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/Flags.java
index 2e2247dbde8..9d0af95da31 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/Flags.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/Flags.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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
@@ -168,7 +168,7 @@ public final class Flags {
* @return the standard string representation of the given flags
*/
public static String toString(int flags) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (isPublic(flags)) sb.append("public "); //$NON-NLS-1$
if (isProtected(flags)) sb.append("protected "); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CLibraryFileEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CLibraryFileEntry.java
index 9882080474f..e7b23e22c45 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CLibraryFileEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CLibraryFileEntry.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
@@ -169,7 +169,7 @@ public final class CLibraryFileEntry extends ACPathEntry implements ICLibraryFil
String result = super.contentsToString();
if(fSourceAttachmentPath != null){
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(result);
buf.append(" ; srcPath=").append(fSourceAttachmentPath); //$NON-NLS-1$
buf.append("; srcRoot=").append(fSourceAttachmentRootPath); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java
index 3a7b06ebe83..3fc3519a674 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/CMacroEntry.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
@@ -80,6 +80,6 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry {
@Override
protected String contentsToString() {
- return new StringBuffer().append(getName()).append('=').append(fValue).toString();
+ return new StringBuilder().append(getName()).append('=').append(fValue).toString();
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataSerializer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataSerializer.java
index 2a14bda2e33..99d2b0518eb 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataSerializer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/CDataSerializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 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
@@ -451,7 +451,7 @@ public class CDataSerializer {
int kinds = data.getSupportedEntryKinds();
int[] allKinds = KindBasedStore.getLanguageEntryKinds();
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
boolean found = false;
for(int i = 0; i < allKinds.length; i++){
if((allKinds[i] & kinds) != 0){
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java
index cea83e72b45..7c4578e93a8 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/util/PathSettingsContainer.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
@@ -630,10 +630,10 @@ public final class PathSettingsContainer {
@Override
public String toString() {
- return contributeToString(new StringBuffer(), 0).toString();
+ return contributeToString(new StringBuilder(), 0).toString();
}
- private StringBuffer contributeToString(StringBuffer buf, int depth){
+ private StringBuilder contributeToString(StringBuilder buf, int depth){
for (int i= 0; i < depth; i++) {
buf.append('\t');
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
index aaa3a185753..ea28c526bbd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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
@@ -140,7 +140,7 @@ public abstract class APathEntry extends PathEntry {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(super.toString());
if (basePath != null && !basePath.isEmpty()) {
sb.append(" base-path:").append(basePath.toString()); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
index 241f1f0eb67..1ae86c0a2c2 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
@@ -486,7 +486,7 @@ public class Binary extends Openable implements IBinary {
if (buffer.getCharacters() == null){
IBinaryObject bin = getBinaryObject();
if (bin != null) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
try {
BufferedReader stream = new BufferedReader(new InputStreamReader(bin.getContents()));
char[] buf = new char[512];
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
index 0cabfd3f135..2771b5c207e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -190,7 +190,7 @@ public class Buffer implements IBuffer {
int gapLength = this.gapEnd - this.gapStart;
return new String(this.contents, offset + gapLength, length);
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(this.contents, offset, this.gapStart - offset);
buf.append(this.contents, this.gapEnd, offset + length - this.gapStart);
return buf.toString();
@@ -450,7 +450,7 @@ public class Buffer implements IBuffer {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("Owner: " + ((CElement)this.owner).toString()); //$NON-NLS-1$
buffer.append("\nHas unsaved changes: " + this.hasUnsavedChanges()); //$NON-NLS-1$
buffer.append("\nIs readonly: " + this.isReadOnly()); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
index a1bc66d465e..b06e193fca2 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.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
@@ -633,7 +633,7 @@ public class CElementDelta implements ICElementDelta {
* @see #toString()
*/
public String toDebugString(int depth) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for (int i= 0; i < depth; i++) {
buffer.append('\t');
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java
index 7aa40bf4029..c310c42ab1c 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDeltaBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2010 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -370,7 +370,7 @@ private void removeElementInfo(ICElement element) {
}
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("Built delta:\n"); //$NON-NLS-1$
buffer.append(this.delta.toString());
return buffer.toString();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelStatus.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelStatus.java
index 4ea14d09bf2..875005f390d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelStatus.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelStatus.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
@@ -169,7 +169,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
public String getMessage() {
Throwable exception = getException();
if (isMultiStatus()) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
IStatus[] children = getChildren();
if (children != null && children.length > 0) {
for (int i = 0; i < children.length; ++i) {
@@ -205,7 +205,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
return CoreModelMessages.getFormattedString("status.invalidDestination", getFirstElementName()); //$NON-NLS-1$
case INVALID_ELEMENT_TYPES:
- StringBuffer buff = new StringBuffer(CoreModelMessages.getFormattedString("operation.notSupported")); //$NON-NLS-1$
+ StringBuilder buff = new StringBuilder(CoreModelMessages.getFormattedString("operation.notSupported")); //$NON-NLS-1$
for (int i = 0; i < fElements.length; i++) {
if (i > 0) {
buff.append(", "); //$NON-NLS-1$
@@ -243,7 +243,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
return CoreModelMessages.getFormattedString("status.IOException"); //$NON-NLS-1$
case NAME_COLLISION:
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (fElements != null && fElements.length > 0) {
ICElement element = fElements[0];
sb.append(element.getElementName()).append(' ');
@@ -413,7 +413,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
if (this == VERIFIED_OK) {
return "CModelStatus[OK]"; //$NON-NLS-1$
}
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("C Model Status ["); //$NON-NLS-1$
buffer.append(getMessage());
buffer.append("]"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyElementsOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyElementsOperation.java
index 2f9d3b14fec..f1c980b291a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyElementsOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyElementsOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -113,7 +113,7 @@ public class CopyElementsOperation extends MultiOperation {
ISourceReference source = (ISourceReference)element;
ISourceRange range = source.getSourceRange();
String contents = source.getSource();
- StringBuffer sb = new StringBuffer(contents);
+ StringBuilder sb = new StringBuilder(contents);
// Copy the extra spaces and newLines like it is part of
// the element. Note: the DeleteElementAction is doing the same.
IBuffer buffer = getSourceTranslationUnit(element).getBuffer();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateFieldOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateFieldOperation.java
index 510a5b3f133..d22ffb00a72 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateFieldOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateFieldOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -94,7 +94,7 @@ public class CreateFieldOperation extends CreateMemberOperation {
*/
@Override
protected String generateElement(ITranslationUnit unit) throws CModelException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(fReturnType).append(' ');
sb.append(fName);
if (fInitializer != null && fInitializer.length() > 0) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateIncludeOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateIncludeOperation.java
index b7bca3467fb..d7c6703b945 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateIncludeOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateIncludeOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2008 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
@@ -117,7 +117,7 @@ public class CreateIncludeOperation extends CreateElementInTUOperation {
*/
@Override
protected String generateElement(ITranslationUnit unit) throws CModelException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("#include "); //$NON-NLS-1$;
if (fIsStandard) {
sb.append('<');
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateMethodOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateMethodOperation.java
index 7bf73d117d7..ff02a70915d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateMethodOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateMethodOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -94,7 +94,7 @@ public class CreateMethodOperation extends CreateMemberOperation {
*/
@Override
protected String generateElement(ITranslationUnit unit) throws CModelException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(fReturnType);
sb.append(' ');
sb.append(fName);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateNamespaceOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateNamespaceOperation.java
index fc7a47fa44c..41fa2a1ff9e 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateNamespaceOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateNamespaceOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -77,7 +77,7 @@ public class CreateNamespaceOperation extends CreateElementInTUOperation {
*/
@Override
protected String generateElement(ITranslationUnit unit) throws CModelException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("namespace "); //$NON-NLS-1$;
sb.append(fNamespace).append(' ').append('{');
sb.append(Util.LINE_SEPARATOR);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateUsingOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateUsingOperation.java
index 5568cc4ca35..56141844b19 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateUsingOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CreateUsingOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -85,7 +85,7 @@ public class CreateUsingOperation extends CreateElementInTUOperation {
*/
@Override
protected String generateElement(ITranslationUnit unit) throws CModelException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("using "); //$NON-NLS-1$;
if (fIsDirective) {
sb.append("namespace "); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java
index da0ca3a6f7f..769d247f66d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/DefaultPathEntryStore.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
@@ -338,7 +338,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
// Save the exclusions attributes
IPath[] exclusionPatterns = entry.getExclusionPatterns();
if (exclusionPatterns.length > 0) {
- StringBuffer excludeRule = new StringBuffer(10);
+ StringBuilder excludeRule = new StringBuilder(10);
for (int j = 0, max = exclusionPatterns.length; j < max; j++) {
if (j > 0) {
excludeRule.append('|');
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplate.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplate.java
index 9c7669b8f06..6b516f0b163 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplate.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -67,7 +67,7 @@ public class FunctionTemplate extends Function implements IFunctionTemplate {
*/
@Override
public String getTemplateSignature() throws CModelException {
- StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
+ StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
sig.append(this.getParameterClause());
if (isConst()) {
sig.append(" const"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplateDeclaration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplateDeclaration.java
index 8e889cb2d46..6545f68acc9 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplateDeclaration.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionTemplateDeclaration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 QnX Software Systems and others.
+ * Copyright (c) 2005, 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
@@ -36,7 +36,7 @@ public class FunctionTemplateDeclaration extends FunctionDeclaration implements
@Override
public String getTemplateSignature() throws CModelException {
- StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
+ StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
sig.append(this.getParameterClause());
if(isConst())
sig.append(" const"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java
index b0868045283..0159e996564 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeEntry.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
@@ -132,7 +132,7 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(super.toString());
if (isSystemInclude) {
sb.append(" isSystemInclude:").append(isSystemInclude); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeFileEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeFileEntry.java
index cbac4944b5f..2e4fef61f31 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeFileEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeFileEntry.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
@@ -119,7 +119,7 @@ public class IncludeFileEntry extends APathEntry implements IIncludeFileEntry {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(super.toString());
if (includeFilePath != null && !includeFilePath.isEmpty()) {
sb.append(" includeFilePath:").append(includeFilePath); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java
index 6a41c3cccf4..80a41774da2 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/LibraryEntry.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
@@ -192,7 +192,7 @@ public class LibraryEntry extends APathEntry implements ILibraryEntry {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(super.toString());
if (libraryPath != null && !libraryPath.isEmpty()) {
sb.append(" librarypath:").append(libraryPath.toString()); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java
index bc1be07d688..6050e260c28 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroEntry.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
@@ -92,7 +92,7 @@ public class MacroEntry extends APathEntry implements IMacroEntry {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(super.toString());
if (macroName != null && macroName.length() > 0) {
sb.append(" name:").append(macroName); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroFileEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroFileEntry.java
index faef460f5cd..0f463429952 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroFileEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MacroFileEntry.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
@@ -121,7 +121,7 @@ public class MacroFileEntry extends APathEntry implements IMacroFileEntry {
*/
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(super.toString());
if (macroFilePath != null && !macroFilePath.isEmpty()) {
sb.append(" macroFilePath:").append(macroFilePath); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java
index 537e936e770..d7d1a8d20ab 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2013 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -63,7 +63,7 @@ public class MethodTemplate extends Method implements IMethodTemplate {
*/
@Override
public String getTemplateSignature() throws CModelException {
- StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
+ StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
sig.append(this.getParameterClause());
if (isConst())
sig.append(" const"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplateDeclaration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplateDeclaration.java
index 9a4cea32c03..67362844407 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplateDeclaration.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodTemplateDeclaration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 QnX Software Systems and others.
+ * Copyright (c) 2005, 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
@@ -36,7 +36,7 @@ public class MethodTemplateDeclaration extends MethodDeclaration implements IMet
@Override
public String getTemplateSignature() throws CModelException {
- StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
+ StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
sig.append(this.getParameterClause());
if(isConst())
sig.append(" const"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java
index 2dff9b7ddd2..ff2b74205eb 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntry.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
@@ -146,7 +146,7 @@ public class PathEntry implements IPathEntry {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (path != null && !path.isEmpty()) {
buffer.append(path.toString()).append(' ');
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java
index cdc00259e5c..1762b5ab789 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java
@@ -354,7 +354,7 @@ public class PathEntryUtil {
if (dups.size() > 0) {
ICModelStatus[] cmodelStatus = new ICModelStatus[dups.size()];
for (int i = 0; i < dups.size(); ++i) {
- StringBuffer errMesg = new StringBuffer(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
+ StringBuilder errMesg = new StringBuilder(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
cmodelStatus[i] = new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
}
return CModelStatus.newMultiStatus(ICModelStatusConstants.INVALID_PATHENTRY, cmodelStatus);
@@ -365,7 +365,7 @@ public class PathEntryUtil {
if (dups.size() > 0) {
ICModelStatus[] cmodelStatus = new ICModelStatus[dups.size()];
for (int i = 0; i < dups.size(); ++i) {
- StringBuffer errMesg = new StringBuffer(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
+ StringBuilder errMesg = new StringBuilder(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
cmodelStatus[i] = new CModelStatus(ICModelStatusConstants.NAME_COLLISION, errMesg.toString());
}
return CModelStatus.newMultiStatus(ICModelStatusConstants.INVALID_PATHENTRY, cmodelStatus);
@@ -392,15 +392,15 @@ public class PathEntryUtil {
&& !CoreModelUtil.isExcluded(entryPath.append("*"), exclusionPatterns)) { //$NON-NLS-1$
if (CoreModelUtil.isExcluded(entryPath, exclusionPatterns)) {
- StringBuffer errMesg = new StringBuffer(
+ StringBuilder errMesg = new StringBuilder(
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
} else if (otherKind == IPathEntry.CDT_SOURCE) {
- StringBuffer errMesg = new StringBuffer(
+ StringBuilder errMesg = new StringBuilder(
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
} else {
- StringBuffer errMesg = new StringBuffer(
+ StringBuilder errMesg = new StringBuilder(
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java
index 53d4506e7ad..d692c8e2c52 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Region.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 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
@@ -151,7 +151,7 @@ public class Region implements IRegion {
*/
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
ICElement[] roots = getElements();
buffer.append('[');
for (int i = 0; i < roots.length; i++) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulationInfo.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulationInfo.java
index b5a521da87d..56fdb3e531d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulationInfo.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceManipulationInfo.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
@@ -105,7 +105,7 @@ class SourceManipulationInfo extends CElementInfo {
// try {
// IResource res = tu.getResource();
// if (res != null && res instanceof IFile) {
-// StringBuffer buffer = Util.getContent((IFile)res);
+// StringBuilder buffer = Util.getContent((IFile)res);
// return buffer.substring(getElement().getStartPos(),
// getElement().getStartPos() + getElement().getLength());
// }
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceRange.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceRange.java
index c8fd6bd590a..9952ea4b7e9 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceRange.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SourceRange.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
@@ -87,7 +87,7 @@ class SourceRange implements ISourceRange {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("[offset="); //$NON-NLS-1$
buffer.append(this.startPos);
buffer.append(", length="); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Template.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Template.java
index 229b41b37d4..16138733bd6 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Template.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Template.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 QnX Software Systems and others.
+ * Copyright (c) 2005, 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 Template implements ITemplate {
*/
@Override
public String getTemplateSignature() {
- StringBuffer sig = new StringBuffer(fName);
+ StringBuilder sig = new StringBuilder(fName);
if(getNumberOfTemplateParameters() > 0){
sig.append("<"); //$NON-NLS-1$
String[] paramTypes = getTemplateParameterTypes();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/VariableTemplate.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/VariableTemplate.java
index f840831db4d..f70d67d2954 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/VariableTemplate.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/VariableTemplate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -56,7 +56,7 @@ public class VariableTemplate extends Variable implements ITemplate {
*/
@Override
public String getTemplateSignature() throws CModelException {
- StringBuffer sig = new StringBuffer(getElementName());
+ StringBuilder sig = new StringBuilder(getElementName());
if(getNumberOfTemplateParameters() > 0){
sig.append("<"); //$NON-NLS-1$
String[] paramTypes = getTemplateParameterTypes();
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java
index 1d90f49fb8b..daf87d765a4 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/util/LRUCache.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2009 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -435,7 +435,7 @@ public class LRUCache<K, T> implements Cloneable {
* is for debugging purposes only.
*/
protected String toStringContents() {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
int length = fEntryTable.size();
Object[] unsortedKeys = new Object[length];
String[] unsortedToStrings = new String[length];
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java
index b798fc5cb8d..aed5441aecb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/parser/AbstractScannerExtensionConfiguration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -201,7 +201,7 @@ public abstract class AbstractScannerExtensionConfiguration implements IScannerE
*/
@Deprecated
protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments) {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
buf.append(name);
buf.append('(');
for (int i = 0; i < arguments.length; i++) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/SegmentMatcher.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/SegmentMatcher.java
index 57d34d217ce..0c77825f1ff 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/SegmentMatcher.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/util/SegmentMatcher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Tomasz Wesolowski and others
+ * Copyright (c) 2011, 2016 Tomasz Wesolowski 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
@@ -50,7 +50,7 @@ public class SegmentMatcher {
singleSegment = true;
} else {
- StringBuffer regexpBuffer = new StringBuffer("^"); //$NON-NLS-1$
+ StringBuilder regexpBuffer = new StringBuilder("^"); //$NON-NLS-1$
int i = 0;
int lengthOfFirstSegment = 0;
char currentChar;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java
index f9f82cd1189..43398fd7e06 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/Cost.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 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
@@ -394,4 +394,4 @@ public class Cost {
public void setListInitializationTarget(IType target) {
fListInitializationTarget = target;
}
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
index 510f3284206..4046cc5a525 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Symbian Software Systems and others.
+ * Copyright (c) 2007, 2016 Symbian 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
@@ -42,7 +42,7 @@ public class CompositeCPPFunctionSpecialization extends CompositeCPPFunction imp
@Override
public String toString() {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
result.append(getName()+" "+ASTTypeUtil.getParameterTypeString(getType())); //$NON-NLS-1$
return result.toString();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroDefinitionParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroDefinitionParser.java
index 59e474fd310..a03f4331a2f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroDefinitionParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroDefinitionParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -70,7 +70,7 @@ public class MacroDefinitionParser {
} catch (OffsetLimitReachedException e) {
}
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
Token t= tl.first();
if (t == null) {
return CharArrayUtils.EMPTY;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java
index fe35afe0897..3051ee393d7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 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
@@ -21,7 +21,7 @@ public class TraceUtil {
public static void outputTrace(IParserLogService log, String preface, IProblem problem,
String first, String second, String third) {
if (log.isTracing()) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (preface != null) buffer.append(preface);
if (problem != null) buffer.append(problem.getMessageWithLocation());
if (first != null) buffer.append(first);
@@ -33,7 +33,7 @@ public class TraceUtil {
public static void outputTrace(IParserLogService log, String preface, IProblem problem) {
if (log.isTracing()) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (preface != null) buffer.append(preface);
if (problem != null) buffer.append(problem.getMessageWithLocation());
log.traceLog(buffer.toString());
@@ -43,7 +43,7 @@ public class TraceUtil {
public static void outputTrace(IParserLogService log, String preface, IProblem problem,
char[] first, String second, String third) {
if (log.isTracing()) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (preface != null) buffer.append(preface);
if (problem != null) buffer.append(problem.getMessageWithLocation());
if (first != null) buffer.append(first);
@@ -73,7 +73,7 @@ public class TraceUtil {
public static void outputTrace(IParserLogService logService, String preface, String data) {
if (logService.isTracing()) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (preface != null) buffer.append(preface);
if (data != null) buffer.append(data);
logService.traceLog(buffer.toString());
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CDescriptorEvent.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CDescriptorEvent.java
index 6bc9857b352..d5bff8da88f 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CDescriptorEvent.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CDescriptorEvent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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 CDescriptorEvent extends EventObject {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
switch (getType()) {
case CDTPROJECT_ADDED :
buf.append("CDTPROJECT_ADDED"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java
index a8122be8414..0fdd28032b8 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 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
@@ -294,7 +294,7 @@ public class CommandLauncher implements ICommandLauncher {
@SuppressWarnings("nls")
private String getCommandLineQuoted(String[] commandArgs, boolean quote) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if (commandArgs != null) {
for (String commandArg : commandArgs) {
if (quote && (commandArg.contains(" ") || commandArg.contains("\"") || commandArg.contains("\\"))) {
@@ -331,4 +331,4 @@ public class CommandLauncher implements ICommandLauncher {
fProject = project;
}
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/EFSExtensionProvider.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/EFSExtensionProvider.java
index 7659b1d0539..842bafc6a3b 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/EFSExtensionProvider.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/EFSExtensionProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -99,7 +99,7 @@ public abstract class EFSExtensionProvider {
Path p = new Path(path);
String pathString = p.toString(); // to convert any backslashes to slashes if we are on Windows
final int length = pathString.length();
- StringBuffer pathBuf = new StringBuffer(length + 1);
+ StringBuilder pathBuf = new StringBuilder(length + 1);
// force the path to be absolute including Windows where URI path is represented as "/C:/path"
if (length > 0 && (pathString.charAt(0) != '/')) {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/IndentManipulation.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/IndentManipulation.java
index 9427ba2ed1d..0117d24f698 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/IndentManipulation.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/IndentManipulation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -276,7 +276,7 @@ public final class IndentManipulation {
return code;
}
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
for (int i= 0; i < nLines; i++) {
IRegion region= tracker.getLineInformation(i);
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/PathEntryVariableChangeEvent.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/PathEntryVariableChangeEvent.java
index de5975fccf6..b54657cfb8b 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/PathEntryVariableChangeEvent.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/PathEntryVariableChangeEvent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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
@@ -77,7 +77,7 @@ public class PathEntryVariableChangeEvent extends EventObject {
@Override
public String toString() {
String[] typeStrings = {"VARIABLE_CHANGED", "VARIABLE_CREATED", "VARIABLE_DELETED"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- StringBuffer sb = new StringBuffer(getClass().getName());
+ StringBuilder sb = new StringBuilder(getClass().getName());
sb.append("[variable = "); //$NON-NLS-1$
sb.append(variableName);
sb.append(", type = "); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java
index cc98945a5b4..1b2737665fd 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/BuildRunnerHelper.java
@@ -485,7 +485,7 @@ public class BuildRunnerHelper implements Closeable {
* Compose command line that presumably will be run by launcher.
*/
private static String guessCommandLine(String command, String[] args) {
- StringBuffer buf = new StringBuffer(command + ' ');
+ StringBuilder buf = new StringBuilder(command + ' ');
if (args != null) {
for (String arg : args) {
buf.append(arg);
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/ConsoleOutputSniffer.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/ConsoleOutputSniffer.java
index 0744f623f0b..1b8596c6dc4 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/ConsoleOutputSniffer.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/ConsoleOutputSniffer.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
@@ -27,7 +27,7 @@ public class ConsoleOutputSniffer {
*/
private class ConsoleOutputStream extends OutputStream {
// Stream's private buffer for the stream's read contents.
- private StringBuffer currentLine = new StringBuffer();
+ private StringBuilder currentLine = new StringBuilder();
private OutputStream outputStream = null;
public ConsoleOutputStream(OutputStream outputStream) {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java
index 9fff4605a2c..30d936d5669 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CCodeFormatter.java
@@ -103,7 +103,7 @@ public class CCodeFormatter extends CodeFormatter {
if (tabs == 0 && spaces == 0) {
return EMPTY_STRING;
}
- StringBuffer buffer= new StringBuffer(tabs + spaces);
+ StringBuilder buffer= new StringBuilder(tabs + spaces);
for (int i= 0; i < tabs; i++) {
buffer.append('\t');
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java
index 37389923218..884923f7e89 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited 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
@@ -373,7 +373,7 @@ public class ProcessArgument {
*/
@Override
public String toString() {
- StringBuffer b = new StringBuffer(name);
+ StringBuilder b = new StringBuilder(name);
b.append(":"); //$NON-NLS-1$
switch (type) {
case ProcessParameter.SIMPLE:
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/WeakHashSet.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/WeakHashSet.java
index 9339ff39e14..a47b79da30b 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/WeakHashSet.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/WeakHashSet.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
@@ -208,7 +208,7 @@ public class WeakHashSet<T> {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer("{"); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder("{"); //$NON-NLS-1$
for (int i = 0, length = this.values.length; i < length; i++) {
HashableWeakReference<T> value = this.values[i];
if (value != null) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/AR.java
index da2f8213896..c89cc421bdd 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/AR.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/AR.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -104,7 +104,7 @@ public class AR {
* <code>offset</code> not in string table bounds.
*/
private String nameFromStringTable(long offset) throws IOException {
- StringBuffer name = new StringBuffer(0);
+ StringBuilder name = new StringBuilder(0);
long pos = efile.getFilePointer();
try {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr32.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr32.java
index 023b018df60..a6e5fcb06c2 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr32.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr32.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 Intel Corporation and others.
+ * Copyright (c) 2004, 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
@@ -151,7 +151,7 @@ public class Addr32 implements IAddress, Serializable {
@Override
public String toHexAddressString() {
String addressString = Long.toString(address, 16);
- StringBuffer sb = new StringBuffer(CHARS_NUM);
+ StringBuilder sb = new StringBuilder(CHARS_NUM);
int count = DIGITS_NUM - addressString.length();
sb.append("0x"); //$NON-NLS-1$
for (int i = 0; i < count; ++i) {
@@ -166,7 +166,7 @@ public class Addr32 implements IAddress, Serializable {
*/
public String toOctalAddressString() {
String addressString = Long.toString(address, 8);
- StringBuffer sb = new StringBuffer(OCTAL_CHARS_NUM);
+ StringBuilder sb = new StringBuilder(OCTAL_CHARS_NUM);
int count = OCTAL_DIGITS_NUM - addressString.length();
sb.append("0"); //$NON-NLS-1$
for (int i = 0; i < count; ++i) {
@@ -179,7 +179,7 @@ public class Addr32 implements IAddress, Serializable {
@Override
public String toBinaryAddressString() {
String addressString = Long.toString(address, 2);
- StringBuffer sb = new StringBuffer(BINARY_CHARS_NUM);
+ StringBuilder sb = new StringBuilder(BINARY_CHARS_NUM);
int count = BINARY_DIGITS_NUM - addressString.length();
sb.append("0b"); //$NON-NLS-1$
for (int i = 0; i < count; ++i) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr64.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr64.java
index 67dd396754d..d2e48d51ce3 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr64.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Addr64.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 Intel Corporation and others.
+ * Copyright (c) 2004, 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
@@ -169,7 +169,7 @@ public class Addr64 implements IAddress, Serializable {
@Override
public String toHexAddressString() {
String addressString = address.toString(16);
- StringBuffer sb = new StringBuffer(CHARS_NUM);
+ StringBuilder sb = new StringBuilder(CHARS_NUM);
int count = DIGITS_NUM - addressString.length();
sb.append("0x"); //$NON-NLS-1$
for (int i = 0; i < count; ++i) {
@@ -184,7 +184,7 @@ public class Addr64 implements IAddress, Serializable {
*/
public String toOctalAddressString() {
String addressString = address.toString(8);
- StringBuffer sb = new StringBuffer(OCTAL_CHARS_NUM);
+ StringBuilder sb = new StringBuilder(OCTAL_CHARS_NUM);
int count = OCTAL_DIGITS_NUM - addressString.length();
sb.append("0"); //$NON-NLS-1$
for (int i = 0; i < count; ++i) {
@@ -197,7 +197,7 @@ public class Addr64 implements IAddress, Serializable {
@Override
public String toBinaryAddressString() {
String addressString = address.toString(2);
- StringBuffer sb = new StringBuffer(BINARY_CHARS_NUM);
+ StringBuilder sb = new StringBuilder(BINARY_CHARS_NUM);
int count = BINARY_DIGITS_NUM - addressString.length();
sb.append("0b"); //$NON-NLS-1$
for (int i = 0; i < count; ++i) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
index 3f6ffa223c8..eeb0e2bcc1e 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
@@ -116,7 +116,7 @@ public class CygPath {
}
if (ipath.isAbsolute() && !ipath.toFile().exists() && ipath.segment(0).length() == 1) {
// look like it could be /c/... path
- StringBuffer drive = new StringBuffer(ipath.segment(0));
+ StringBuilder drive = new StringBuilder(ipath.segment(0));
drive.append(':');
ipath = ipath.removeFirstSegments(1);
ipath = ipath.makeAbsolute();
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java
index df392515bc6..d63f979a21b 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.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
@@ -78,7 +78,7 @@ public class Objdump {
public byte[] getOutput(int limitBytes) throws IOException {
Process objdump = ProcessFactory.getFactory().exec(args);
try {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
BufferedReader stdout = new BufferedReader(new InputStreamReader(
objdump.getInputStream()));
char[] buf = new char[4096];
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/CdtVariableResolver.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/CdtVariableResolver.java
index 11c1e049dc2..9d07bcbcf9f 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/CdtVariableResolver.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/CdtVariableResolver.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 Intel Corporation and others.
+ * Copyright (c) 2005, 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
@@ -84,7 +84,7 @@ public class CdtVariableResolver {
if(value == null || value.length == 0)
return EMPTY_STRING;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for(int i = 0; i < value.length; i++){
buffer.append(value[i]);
if(listDelimiter != null && !EMPTY_STRING.equals(listDelimiter) && i < value.length -1 )
@@ -113,7 +113,7 @@ public class CdtVariableResolver {
final Pattern pattern = Pattern.compile(".*?("+RE_BSLASH+"*)("+RE_VPREFIX+"("+RE_VNAME+")"+RE_VSUFFIX+").*"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- StringBuffer buffer = new StringBuffer(string);
+ StringBuilder buffer = new StringBuilder(string);
int limit=string.length();
for (Matcher matcher = pattern.matcher(buffer);matcher.matches();matcher = pattern.matcher(buffer)) {
String bSlashes=matcher.group(1);
@@ -223,7 +223,7 @@ public class CdtVariableResolver {
static public String[] resolveToStringList(String string, IVariableSubstitutor substitutor)
throws CdtVariableException{
- StringBuffer buffer = new StringBuffer(string);
+ StringBuilder buffer = new StringBuilder(string);
final Pattern pattern = Pattern.compile("^"+RE_VPREFIX+"("+RE_VNAME+")"+RE_VSUFFIX+"$"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Matcher matcher = pattern.matcher(buffer);
if (matcher.matches()) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java
index 414dee3f4a3..58178023bdf 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 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
@@ -105,7 +105,7 @@ public class SupplierBasedCdtVariableSubstitutor implements IVariableSubstitutor
else if(values.length == 1)
result = values[0];
else if((delimiter = getDelimiter()) != null){
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
for(int i = 0; i < values.length; i++){
buffer.append(values[i]);
if(i < values.length-1)
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java
index 4da86f50438..f227c05a388 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.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
@@ -101,7 +101,7 @@ public class Coff {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("FILE HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("f_magic = ").append(f_magic).append(NL); //$NON-NLS-1$
@@ -152,7 +152,7 @@ public class Coff {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("OPTIONAL HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("magic = ").append(magic).append(NL); //$NON-NLS-1$
buffer.append("vstamp = ").append(vstamp).append(NL); //$NON-NLS-1$
@@ -281,7 +281,7 @@ public class Coff {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("SECTION HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append(new String(s_name)).append(NL);
buffer.append("s_paddr = ").append(s_paddr).append(NL); //$NON-NLS-1$
@@ -343,7 +343,7 @@ public class Coff {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("RELOC VALUES").append(NL); //$NON-NLS-1$
buffer.append("r_vaddr = ").append(r_vaddr); //$NON-NLS-1$
buffer.append(" r_symndx = ").append(r_symndx).append(NL); //$NON-NLS-1$
@@ -372,7 +372,7 @@ public class Coff {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (l_lnno == 0) {
buffer.append("Function address = ").append(l_addr).append(NL); //$NON-NLS-1$
} else {
@@ -648,7 +648,7 @@ public class Coff {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
try {
FileHeader header = null;
header = getFileHeader();
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java
index fcd75d4a68b..f9569addfd2 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java
@@ -89,7 +89,7 @@ public class Exe {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("EXE HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("signature "); //$NON-NLS-1$
@@ -156,7 +156,7 @@ public class Exe {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(rfile).append(NL);
buffer.append(ehdr);
return buffer.toString();
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java
index e42cc1d98a2..1f70b93d830 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java
@@ -160,7 +160,7 @@ public class PE {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("DOS STUB VALUES").append(NL); //$NON-NLS-1$
buffer.append("e_lfanew = ").append(e_lfanew).append(NL); //$NON-NLS-1$
buffer.append(new String(dos_message)).append(NL);
@@ -268,7 +268,7 @@ public class PE {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("NT OPTIONAL HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("ImageBase = ").append(ImageBase).append(NL); //$NON-NLS-1$
buffer.append("SexctionAlignement = ").append(SectionAlignment).append(NL); //$NON-NLS-1$
@@ -306,7 +306,7 @@ public class PE {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("rva = ").append(rva).append(" "); //$NON-NLS-1$ //$NON-NLS-2$
buffer.append("size = ").append(size).append(NL); //$NON-NLS-1$
return buffer.toString();
@@ -339,7 +339,7 @@ public class PE {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("rva = ").append(rva); //$NON-NLS-1$
buffer.append(" timestamp = ").append(timestamp); //$NON-NLS-1$
buffer.append(" forwarder = ").append(forwarder); //$NON-NLS-1$
@@ -699,7 +699,7 @@ public class PE {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (exeHeader != null) {
buffer.append(exeHeader);
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PEArchive.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PEArchive.java
index f8d2606a635..ecd119b4c23 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PEArchive.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PEArchive.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -93,7 +93,7 @@ public class PEArchive {
* <code>offset</code> not in string table bounds.
*/
private String nameFromStringTable(long offset) throws IOException {
- StringBuffer name = new StringBuffer(0);
+ StringBuilder name = new StringBuilder(0);
long pos = rfile.getFilePointer();
try {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/DebugType.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/DebugType.java
index ca68325f5b7..447fb398ddf 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/DebugType.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/DebugType.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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 DebugType {
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (this instanceof DebugArrayType) {
DebugArrayType arrayType = (DebugArrayType)this;
int size = arrayType.getSize();
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
index 8b9922a34ee..6df934c8f6e 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
@@ -89,7 +89,7 @@ public class Dwarf {
byte offsetSize;
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("Length: " + length).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
sb.append("Version: " + version).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
sb.append("Abbreviation: " + abbreviationOffset).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -125,7 +125,7 @@ public class Dwarf {
}
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("name: " + Long.toHexString(name)); //$NON-NLS-1$
sb.append(" value: " + Long.toHexString(form)); //$NON-NLS-1$
return sb.toString();
@@ -141,7 +141,7 @@ public class Dwarf {
}
@Override
public String toString() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(attribute.toString()).append(' ');
if (value != null) {
Class<? extends Object> clazz = value.getClass();
@@ -670,7 +670,7 @@ public class Dwarf {
case DwarfConstants.DW_FORM_string :
{
int c;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = in.get()) != -1) {
if (c == 0) {
break;
@@ -699,7 +699,7 @@ public class Dwarf {
} else if (offset < 0 || offset > data.capacity()) {
obj = ""; // $NON-NLS-1$
} else {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
data.position((int) offset);
while (data.hasRemaining()) {
byte c = data.get();
@@ -727,7 +727,7 @@ public class Dwarf {
} else if (offset < 0 || offset > data.capacity()) {
obj = ""; // $NON-NLS-1$
} else {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
data.position((int) offset);
while (data.hasRemaining()) {
byte c = data.get();
@@ -914,7 +914,7 @@ public class Dwarf {
{
String str;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while (data.hasRemaining()) {
byte c = data.get();
if (c == 0) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java
index 21b084f1cf7..534855616eb 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java
@@ -154,7 +154,7 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions
String debugName = ""; //$NON-NLS-1$
if (data.hasRemaining()) {
int c;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = data.get()) != -1) {
if (c == 0) {
break;
@@ -1049,7 +1049,7 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions
if (macros == null)
return ""; //$NON-NLS-1$
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (String option: macros) {
sb.append(option);
sb.append(" "); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java
index 5b7f2803733..3a5d4192fee 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/Stabs.java
@@ -130,7 +130,7 @@ public class Stabs {
}
String makeString(long offset) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (; offset < stabstrData.length; offset++) {
byte b = stabstrData[(int) offset];
if (b == 0) {
@@ -754,7 +754,7 @@ public class Stabs {
* @return
*/
DebugType parseStabCrossRefType(String name, Reader reader) throws IOException {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int c = reader.read();
if (c == 's') {
sb.append("struct "); //$NON-NLS-1$
@@ -794,7 +794,7 @@ public class Stabs {
reader.reset();
}
int c;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
// get the width
//int width = 0;
@@ -854,7 +854,7 @@ public class Stabs {
case 'R' :
{
int c;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
// get the fp-Type
//int fpType = 0;
@@ -895,7 +895,7 @@ public class Stabs {
//DebugType type = parseStabType(name, reader);
parseStabType(name, reader);
int c = reader.read(); // semicolon
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int nbits = 0;
while ((c = reader.read()) != -1) {
sb.append((char) c);
@@ -930,7 +930,7 @@ public class Stabs {
return null;
}
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = reader.read()) != -1) {
if (c == ';') {
break;
@@ -997,7 +997,7 @@ public class Stabs {
DebugType parseStabEnumType(String name, Reader reader) throws IOException {
List<DebugEnumField> list = new ArrayList<DebugEnumField>();
String fieldName = null;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int c;
while ((c = reader.read()) != -1) {
if (c == ':') {
@@ -1037,7 +1037,7 @@ public class Stabs {
*/
DebugType parseStabStructType(String name, TypeNumber typeNumber, boolean union, Reader reader) throws IOException {
int c;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = reader.read()) != -1) {
if (!Character.isDigit((char) c)) {
reader.reset();
@@ -1064,7 +1064,7 @@ public class Stabs {
void parseStabStructField(DebugStructType structType, Reader reader) throws IOException {
// get the field name.
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int c;
while ((c = reader.read()) != -1) {
if (c != ':') {
@@ -1143,7 +1143,7 @@ public class Stabs {
return new DebugUnknownType(name);
}
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
// read the lowerBound.
while ((c = reader.read()) != -1) {
@@ -1277,7 +1277,7 @@ public class Stabs {
DebugType type = parseStabType("", reader); //$NON-NLS-1$
c = reader.read();
if (c == ',') {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = reader.read()) != -1) {
sb.append((char) c);
}
@@ -1297,7 +1297,7 @@ public class Stabs {
case 'i' :
{
int val = 0;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = reader.read()) != -1) {
sb.append((char) c);
}
@@ -1319,7 +1319,7 @@ public class Stabs {
case 'r' :
{
double val = 0;
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = reader.read()) != -1) {
sb.append((char) c);
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/StabsReader.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/StabsReader.java
index 8c07cd75efc..7c3d1abed84 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/StabsReader.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/StabsReader.java
@@ -59,7 +59,7 @@ public class StabsReader implements ISymbolReader {
}
private String makeString(long offset) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (; offset < stabstrData.length; offset++) {
byte b = stabstrData[(int) offset];
if (b == 0) {
@@ -120,7 +120,7 @@ public class StabsReader implements ISymbolReader {
char driveLetter = path.charAt(10);
driveLetter = (Character.isLowerCase(driveLetter)) ? Character.toUpperCase(driveLetter) : driveLetter;
- StringBuffer buf = new StringBuffer(path);
+ StringBuilder buf = new StringBuilder(path);
buf.delete(0, 11);
buf.insert(0, driveLetter);
buf.insert(1, ':');
@@ -133,7 +133,7 @@ public class StabsReader implements ISymbolReader {
char driveLetter = path.charAt(2);
driveLetter = (Character.isLowerCase(driveLetter)) ? Character.toUpperCase(driveLetter) : driveLetter;
- StringBuffer buf = new StringBuffer(path);
+ StringBuilder buf = new StringBuilder(path);
buf.delete(0, 3);
buf.insert(0, driveLetter);
buf.insert(1, ':');
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/TypeNumber.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/TypeNumber.java
index 17634669aec..746895b3fb3 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/TypeNumber.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/stabs/TypeNumber.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -61,7 +61,7 @@ public class TypeNumber {
if (c == -1) {
return;
} else if (ch == '(') {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while ((c = reader.read()) != -1) {
ch = (char)c;
if (ch == ')') {
@@ -83,7 +83,7 @@ public class TypeNumber {
}
}
} else if (Character.isDigit(ch)) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(ch);
reader.mark(1);
while ((c = reader.read()) != -1) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
index e808f26ad13..e2141d4b0aa 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.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
@@ -80,7 +80,7 @@ public class DebugDump implements IDebugEntryRequestor {
}
String printTabs() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < bracket; i++) {
sb.append('\t');
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java
index b3db19a77a1..48d0109147c 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.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
@@ -43,7 +43,7 @@ public class DebugSym implements Comparable<Object> {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("Type:").append(type).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("Name: ").append(name).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("\taddress:").append("0x").append(Long.toHexString(addr)).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java
index 6727d2b90bf..994bcc757a4 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -91,7 +91,7 @@ public class AR {
* <code>offset</code> not in string table bounds.
*/
private String nameFromStringTable(long offset) throws IOException {
- StringBuffer name = new StringBuffer(0);
+ StringBuilder name = new StringBuilder(0);
long pos = efile.getFilePointer();
try {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java
index 4bfc5a58fba..812b22ec933 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.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
@@ -367,7 +367,7 @@ public class Elf {
return EMPTY_STRING;
}
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
//Most string symbols will be less than 50 bytes in size
byte [] tmp = new byte[50];
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/ElfHelper.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/ElfHelper.java
index 24ca804c19a..73093f78844 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/ElfHelper.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/ElfHelper.java
@@ -321,7 +321,7 @@ public class ElfHelper {
String full_usage = new String(sections[i].loadSectionData());
String usage = getSubUsage(full_usage, file.getName());
- StringBuffer buffer = new StringBuffer(usage);
+ StringBuilder buffer = new StringBuilder(usage);
for (int j = 0; j < buffer.length(); j++) {
if (buffer.charAt(j) == '%') {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java
index 92bdb50e035..6f458aefcdc 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java
@@ -210,7 +210,7 @@ public class EnvVarOperationProcessor {
*/
static public String convertToString(List<String> list, String delimiter){
Iterator<String> iter = list.iterator();
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
while(iter.hasNext()){
buffer.append(iter.next());
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java
index 29ccf9aa040..04eeafeebe2 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/AR.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
@@ -80,7 +80,7 @@ public class AR {
* <code>offset</code> not in string table bounds.
*/
// private String nameFromStringTable(long offset) throws IOException {
-// StringBuffer name = new StringBuffer(0);
+// StringBuilder name = new StringBuilder(0);
// long pos = efile.getFilePointer();
//
// try {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO.java
index 84508d3adf2..2c44bea59e9 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO.java
@@ -1278,7 +1278,7 @@ public class MachO {
// }
private String getCStr() throws IOException {
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
while( true ) {
byte tmp = efile.readByte();
if (tmp == 0)
@@ -1291,7 +1291,7 @@ public class MachO {
private String getLCStr(int len) throws IOException {
if (len == 0)
return EMPTY_STRING;
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
for (; len > 0; len--) {
byte tmp = efile.readByte();
if (tmp == 0)
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO64.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO64.java
index 3527830d5ce..58834f32f7a 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO64.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/macho/MachO64.java
@@ -1347,7 +1347,7 @@ public class MachO64 {
// }
private String getCStr() throws IOException {
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
while(true ) {
byte tmp = efile.readByte();
if (tmp == 0)
@@ -1360,7 +1360,7 @@ public class MachO64 {
private String getLCStr(int len) throws IOException {
if (len == 0)
return EMPTY_STRING;
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
for (; len > 0; len--) {
byte tmp = efile.readByte();
if (tmp == 0)
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java
index 3ead24f8e8a..fffa1299b56 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/AR.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 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
@@ -313,7 +313,7 @@ public class AR {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (lstHeader != null) {
buffer.append("LST HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("system_id = ").append(lstHeader.system_id).append(NL); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/SOM.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/SOM.java
index b6bfe1ea8e3..a72ac887337 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/SOM.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/SOM.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 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
@@ -151,7 +151,7 @@ public class SOM {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("FILE HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("system_id = ").append(system_id).append(NL); //$NON-NLS-1$
@@ -338,7 +338,7 @@ public class SOM {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("SYMBOL TABLE ENTRY").append(NL); //$NON-NLS-1$
buffer.append("symbol_name = "); //$NON-NLS-1$
try {
@@ -502,7 +502,7 @@ public class SOM {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
try {
FileHeader header = null;
header = getFileHeader();
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java
index e96e0b16e64..43fffe957ba 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/AR.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 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
@@ -182,7 +182,7 @@ public class AR {
* <code>offset</code> not in string table bounds.
*/
// private String nameFromStringTable(long offset) throws IOException {
-// StringBuffer name = new StringBuffer(0);
+// StringBuilder name = new StringBuilder(0);
// long pos = file.getFilePointer();
//
// try {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/XCoff32.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/XCoff32.java
index 41092607345..35f35d1f484 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/XCoff32.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/XCoff32.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 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
@@ -119,7 +119,7 @@ public class XCoff32 {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("FILE HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("f_magic = ").append(f_magic).append(NL); //$NON-NLS-1$
@@ -205,7 +205,7 @@ public class XCoff32 {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("OPTIONAL HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append("magic = ").append(magic).append(NL); //$NON-NLS-1$
buffer.append("vstamp = ").append(vstamp).append(NL); //$NON-NLS-1$
@@ -370,7 +370,7 @@ public class XCoff32 {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("SECTION HEADER VALUES").append(NL); //$NON-NLS-1$
buffer.append(new String(s_name)).append(NL);
buffer.append("s_paddr = ").append(s_paddr).append(NL); //$NON-NLS-1$
@@ -544,7 +544,7 @@ public class XCoff32 {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("SYMBOL TABLE ENTRY").append(NL); //$NON-NLS-1$
buffer.append("n_value = ").append(n_value).append(NL); //$NON-NLS-1$
buffer.append("n_scnum = ").append(n_scnum).append(NL); //$NON-NLS-1$
@@ -725,7 +725,7 @@ public class XCoff32 {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
try {
FileHeader header = null;
header = getFileHeader();
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/DisplayHelper.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/DisplayHelper.java
index 8404d2faf11..f3269660766 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/DisplayHelper.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/DisplayHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -600,7 +600,7 @@ final class DisplayWaiter {
* @return a string representation of the states
*/
private String name(int states) {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
boolean comma= false;
if ((states & RUNNING) == RUNNING) {
buf.append("RUNNING");
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java
index b2297cbed4c..cf8a3f33f85 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -121,7 +121,7 @@ abstract public class StringAsserts {
assertEqualString(list1.get(0), list2.get(0));
}
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
for (int i= 0; i < n1; i++) {
String s1= list1.get(i);
if (s1 != null) {
@@ -131,7 +131,7 @@ abstract public class StringAsserts {
}
String actual= buf.toString();
- buf= new StringBuffer();
+ buf= new StringBuilder();
for (int i= 0; i < n2; i++) {
String s2= list2.get(i);
if (s2 != null) {
@@ -164,7 +164,7 @@ abstract public class StringAsserts {
assertEqualString(list1.get(0), list2.get(0));
}
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
for (int i= 0; i < n1; i++) {
String s1= list1.get(i);
if (s1 != null) {
@@ -174,7 +174,7 @@ abstract public class StringAsserts {
}
String actual= buf.toString();
- buf= new StringBuffer();
+ buf= new StringBuilder();
for (int i= 0; i < n2; i++) {
String s2= list2.get(i);
if (s2 != null) {
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.java
index 98c8af548d8..3b6c671d64d 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.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
@@ -283,7 +283,7 @@ public class VerifyDialog extends TitleAreaDialog {
*/
private void handleFailure() {
IDialogTestPass test = _dialogTests[TEST_TYPE];
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
String label = test.label();
label = label.substring(0, label.indexOf("&")) +
label.substring(label.indexOf("&") + 1);
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java
index 8325a97b60f..27773adb9a9 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.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
@@ -969,7 +969,7 @@ public void createPartControl(Composite parent) {
}
if (node instanceof IASTSimpleDeclaration) {
IASTSimpleDeclaration decl = (IASTSimpleDeclaration) node;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(getNodeSignature(decl.getDeclSpecifier()));
IASTDeclarator[] declarators = decl.getDeclarators();
for (int i = 0; i < declarators.length; ++i) {
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java
index 9462b4a5f13..ab6aec979cd 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.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
@@ -128,7 +128,7 @@ public class DOMASTNodeLeaf implements IAdaptable {
@Override
public String toString() {
if( node == null ) return BLANK_STRING;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
List<Class<?>> search= new LinkedList<Class<?>>();
boolean done= false;
boolean needComma= false;
@@ -472,12 +472,12 @@ public class DOMASTNodeLeaf implements IAdaptable {
}
private boolean alreadyEncountered(Method method, IPropertyDescriptor[] desc) {
- StringBuffer name = null;
+ StringBuilder name = null;
for (IPropertyDescriptor element : desc) {
if (element == null) // reached the end of the array
break;
- name = new StringBuffer();
+ name = new StringBuilder();
name.append(method.getName());
name.append(EMPTY_PARAMETER);
if (name.toString().equals(element.getDisplayName()))
@@ -545,7 +545,7 @@ public class DOMASTNodeLeaf implements IAdaptable {
private String getValueString(Object obj) {
if (obj == null) return NULL_STRING;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
if (obj.getClass().isPrimitive()) {
buffer.append(trimObjectToString(obj.toString()));
@@ -635,7 +635,7 @@ public class DOMASTNodeLeaf implements IAdaptable {
private String getValueString(Object[] objs) {
if (objs.length==0) return trimObjectToString(objs.getClass().getName()).replaceAll(SEMI, BLANK_STRING) + NO_ELEMENT_STRING;
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append(L_BRACKET_STRING);
for(int i=0; i<objs.length; i++) {
buffer.append(getValueString(objs[i]));
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java
index b7b5cb54c3f..7224c183826 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 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
@@ -117,7 +117,7 @@ public class DOMASTPluginImages {
}
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/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java
index 16569f57094..1ee5c65689f 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -70,7 +70,7 @@ public class CWordFinderTest extends BaseUITestCase {
public void testFindWord() throws BadLocationException {
IDocument doc= new Document();
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
String word= "word_0815";
for (int i= 0; i < 10; i++) {
buf.append(' ').append(word);
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
index fd46dd5f315..846097a5e4e 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2016 Wind River Systems, 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
@@ -155,7 +155,7 @@ public class FoldingTest extends TestCase {
}
String toString(Position[] positions) throws BadLocationException {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
IDocument document= fSourceViewer.getDocument();
buf.append("Position[] expected= new Position[] {\n");
for (int i= 0, n= positions.length; i < n; i++) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java
index fcc5a0959ae..b9c17299288 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2014 Norbert Ploett and others.
+ * Copyright (c) 2006, 2016 Norbert Ploett 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
@@ -43,7 +43,7 @@ public class ProposalFilterPreferencesTest extends TestCase {
IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore();
String filterComboStateString = store.getString(ContentAssistPreference.PROPOSALS_FILTER);
ProposalFilterPreferencesUtil.ComboState state = ProposalFilterPreferencesUtil.getComboState(filterComboStateString);
- StringBuffer newStateText = new StringBuffer();
+ StringBuilder newStateText = new StringBuilder();
newStateText.append(index + 1); // First entry is always the <Default Filter>, index+1 must be selected
for (int i = 0; i < state.items.length; i++) {
String item = state.items[i];
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.java
index a00501bc784..a628590ae33 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.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
@@ -75,7 +75,7 @@ public class BaseSelectionTestsIndexer extends BaseSelectionTests {
}
protected String getMessage(IStatus status) {
- StringBuffer message = new StringBuffer("["); //$NON-NLS-1$
+ StringBuilder message = new StringBuilder("["); //$NON-NLS-1$
message.append(status.getMessage());
if (status.isMultiStatus()) {
IStatus children[] = status.getChildren();
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
index cdde5157ee6..2915e2f3e4f 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 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
@@ -227,7 +227,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug93281() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("class Point{ \n"); //$NON-NLS-1$
buffer.append("public: \n"); //$NON-NLS-1$
buffer.append("Point(): xCoord(0){} \n"); //$NON-NLS-1$
@@ -273,7 +273,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBasicDefinition() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("extern int MyInt; // def is in another file \n"); //$NON-NLS-1$
buffer.append("extern const int MyConst; // def is in another file \n"); //$NON-NLS-1$
buffer.append("void MyFunc(int); // often used in header files\n"); //$NON-NLS-1$
@@ -399,7 +399,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug86829A() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("class X {\n"); //$NON-NLS-1$
buffer.append("public:\n"); //$NON-NLS-1$
buffer.append("X(int); // openReferences fails to find the constructor in g()\n"); //$NON-NLS-1$
@@ -422,7 +422,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug86829B() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("class X {\n"); //$NON-NLS-1$
buffer.append("public:\n"); //$NON-NLS-1$
buffer.append("operator int();\n"); //$NON-NLS-1$
@@ -474,7 +474,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
using N::d; // declares N::d
*/
public void testCPPSpecDeclsDefs() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int a; // defines a\n"); //$NON-NLS-1$
buffer.append("extern const int c = 1; // defines c\n"); //$NON-NLS-1$
buffer.append("int f(int x) { return x+a; } // defines f and defines x\n"); //$NON-NLS-1$
@@ -740,7 +740,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug95225() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("class Overflow {\n"); //$NON-NLS-1$
buffer.append("public:\n"); //$NON-NLS-1$
buffer.append("Overflow(char,double,double);\n"); //$NON-NLS-1$
@@ -777,7 +777,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testNoDefinitions() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("extern int a1; // declares a\n"); //$NON-NLS-1$
buffer.append("extern const int c1; // declares c\n"); //$NON-NLS-1$
buffer.append("int f1(int); // declares f\n"); //$NON-NLS-1$
@@ -824,7 +824,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug95202() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("struct A { }; // implicitlydeclared A::operator=\n"); //$NON-NLS-1$
buffer.append("struct B : A {\n"); //$NON-NLS-1$
buffer.append("B& operator=(const B &);\n"); //$NON-NLS-1$
@@ -846,7 +846,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug95229() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("struct A {\n"); //$NON-NLS-1$
buffer.append("operator short(); // F3 on operator causes an infinite loop\n"); //$NON-NLS-1$
buffer.append("} a;\n"); //$NON-NLS-1$
@@ -866,7 +866,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug78354() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("typedef int TestTypeOne;\n"); //$NON-NLS-1$
buffer.append("typedef int TestTypeTwo;\n"); //$NON-NLS-1$
buffer.append("int main()\n"); //$NON-NLS-1$
@@ -888,7 +888,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug103697() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int x;\n"); //$NON-NLS-1$
buffer.append("int foo() {\n"); //$NON-NLS-1$
buffer.append(" return x;\n"); //$NON-NLS-1$
@@ -906,7 +906,7 @@ public class CPPSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug76043() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int x;\n"); //$NON-NLS-1$
buffer.append("int foo() {\n"); //$NON-NLS-1$
buffer.append(" return x;\n"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
index b433c17a6a7..1125dc8aaf0 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 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
@@ -241,7 +241,7 @@ public class CSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBasicDefinition() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("extern int MyInt; // def is in another file \n"); //$NON-NLS-1$
buffer.append("extern const int MyConst; // def is in another file \n"); //$NON-NLS-1$
buffer.append("void MyFunc(int); // often used in header files\n"); //$NON-NLS-1$
@@ -330,7 +330,7 @@ public class CSelectionTestsNoIndexer extends BaseSelectionTests {
extern struct X anotherX; // declares anotherX
*/
public void testCPPSpecDeclsDefs() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int a; // defines a\n"); //$NON-NLS-1$
buffer.append("extern const int c = 1; // defines c\n"); //$NON-NLS-1$
buffer.append("int f(int x) { return x+a; } // defines f and defines x\n"); //$NON-NLS-1$
@@ -519,7 +519,7 @@ public class CSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testNoDefinitions() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("extern int a1; // declares a\n"); //$NON-NLS-1$
buffer.append("extern const int c1; // declares c\n"); //$NON-NLS-1$
buffer.append("int f1(int); // declares f\n"); //$NON-NLS-1$
@@ -566,7 +566,7 @@ public class CSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug103697() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int x;\n"); //$NON-NLS-1$
buffer.append("int foo() {\n"); //$NON-NLS-1$
buffer.append(" return x;\n"); //$NON-NLS-1$
@@ -584,7 +584,7 @@ public class CSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug76043() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("int x;\n"); //$NON-NLS-1$
buffer.append("int foo() {\n"); //$NON-NLS-1$
buffer.append(" return x;\n"); //$NON-NLS-1$
@@ -604,7 +604,7 @@ public class CSelectionTestsNoIndexer extends BaseSelectionTests {
}
public void testBug78354() throws Exception {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("typedef int TestTypeOne;\n"); //$NON-NLS-1$
buffer.append("typedef int TestTypeTwo;\n"); //$NON-NLS-1$
buffer.append("int main()\n"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java
index 565d5049eed..2611c674366 100644
--- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.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
@@ -82,7 +82,7 @@ public class TypeInfoLabelProvider extends LabelProvider {
ITypeInfo typeInfo= (ITypeInfo) element;
IQualifiedTypeName qualifiedName = typeInfo.getQualifiedTypeName();
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
if (isSet(SHOW_NAME_ONLY)) {
String name= typeInfo.getName();
if (name != null && name.length() > 0)
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContext.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContext.java
index fca3a09614b..b5945ca30de 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContext.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -77,7 +77,7 @@ public class FileTemplateContext extends TemplateContext {
return code;
}
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
for (int i= 0; i < nLines; i++) {
if (i != 0) {
buf.append(lineDelim);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java
index 4d50f60d5c2..b8e23f0a96f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -133,7 +133,7 @@ public class FileTemplateContextType extends TemplateContextType {
*/
@Override
protected String resolve(TemplateContext context) {
- StringBuffer expr= new StringBuffer("${"); //$NON-NLS-1$
+ StringBuilder expr= new StringBuilder("${"); //$NON-NLS-1$
expr.append(fVariableName);
for (int i = 0; i < fArguments.length; i++) {
expr.append(':').append(fArguments[i]);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/TranslationUnitContextType.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/TranslationUnitContextType.java
index bde96e49d4e..70354e4a18e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/TranslationUnitContextType.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/TranslationUnitContextType.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
@@ -145,7 +145,7 @@ public abstract class TranslationUnitContextType extends TemplateContextType {
if (element instanceof IFunctionDeclaration) {
String[] arguments= ((IFunctionDeclaration)element).getParameterTypes();
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
for (int i= 0; i < arguments.length; i++) {
if (i > 0)
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java
index 45403cdda04..a1c03c090b7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java
@@ -69,7 +69,7 @@ public class Strings {
}
public static String removeNewLine(String message) {
- StringBuffer result= new StringBuffer();
+ StringBuilder result= new StringBuilder();
int current= 0;
int index= message.indexOf('\n', 0);
while (index != -1) {
@@ -391,7 +391,7 @@ public class Strings {
lines[i]= source.substring(offset, offset + region.getLength());
}
Strings.trimIndentation(lines, tabWidth, indentWidth, considerFirstLine);
- StringBuffer result= new StringBuffer();
+ StringBuilder result= new StringBuilder();
int last= size - 1;
for (int i= 0; i < size; i++) {
result.append(lines[i]);
@@ -410,7 +410,7 @@ public class Strings {
* delimiter. No delimiter is added to the last line.
*/
public static String concatenate(String[] lines, String delimiter) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
for (int i= 0; i < lines.length; i++) {
if (i > 0)
buffer.append(delimiter);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java
index f73cc056686..5b0559111ba 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartitioner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2012 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
@@ -286,14 +286,14 @@ public class BuildConsolePartitioner
/** Identifier of the stream written to. */
private BuildConsoleStreamDecorator fStream;
/** The text written */
- private StringBuffer fText = null;
+ private StringBuilder fText = null;
/** Problem marker corresponding to the line of text */
private ProblemMarkerInfo fMarker;
/** Type of event **/
private int eventType;
public StreamEntry(String text, BuildConsoleStreamDecorator stream, ProblemMarkerInfo marker) {
- fText = new StringBuffer(text);
+ fText = new StringBuilder(text);
fStream = stream;
fMarker = marker;
eventType = EVENT_APPEND;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleOutputTextStore.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleOutputTextStore.java
index e694cb5fb3f..0ab7353161b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleOutputTextStore.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/ConsoleOutputTextStore.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 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
@@ -14,10 +14,10 @@ import org.eclipse.jface.text.ITextStore;
public class ConsoleOutputTextStore implements ITextStore {
- private StringBuffer fBuffer;
+ private StringBuilder fBuffer;
public ConsoleOutputTextStore(int bufferSize) {
- fBuffer = new StringBuffer(bufferSize);
+ fBuffer = new StringBuilder(bufferSize);
}
/**
@@ -60,11 +60,11 @@ public class ConsoleOutputTextStore implements ITextStore {
*/
@Override
public void set(String text) {
- fBuffer = new StringBuffer(text);
+ fBuffer = new StringBuilder(text);
}
/**
- * @see StringBuffer#ensureCapacity(int)
+ * @see StringBuilder#ensureCapacity(int)
*/
public void setMinimalBufferSize(int bufferSize) {
fBuffer.ensureCapacity(bufferSize);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java
index 1c535c683ca..37d33fa6427 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHLabelProvider.java
@@ -141,7 +141,7 @@ public class CHLabelProvider extends AppearanceAwareLabelProvider {
break;
}
}
- StringBuffer buf= new StringBuffer(label.length() + 10);
+ StringBuilder buf= new StringBuilder(label.length() + 10);
buf.append("{init "); //$NON-NLS-1$
buf.append(content, 0, i);
buf.append("}()"); //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java
index 164e9dcd89e..92623bc933f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/compare/CStructureCreator.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
@@ -188,7 +188,7 @@ public class CStructureCreator extends StructureCreator {
return null;
BufferedReader reader= null;
try {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
char[] part= new char[2048];
int read= 0;
reader= new BufferedReader(new InputStreamReader(is, encoding));
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java
index 33f0839b8ae..e43d4902a43 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CopyAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -107,7 +107,7 @@ public class CopyAction extends SelectionListenerAction {
final int length = resources.length;
int actualLength = 0;
String[] fileNames = new String[length];
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0; i < length; i++) {
IPath location = resources[i].getLocation();
// location may be null. See bug 29491.
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/StatusInfo.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/StatusInfo.java
index c2548c7f48b..1defdb5db5a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/StatusInfo.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/StatusInfo.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
@@ -137,7 +137,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/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java
index 95a79761d75..7d5e6fac4f4 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
+ * Copyright (c) 2004, 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
@@ -175,7 +175,7 @@ abstract public class AbstractPathOptionBlock extends TabFolderOptionBlock imple
abstract protected List<CPElement> getCPaths();
private String getEncodedSettings() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
List<CPElement> elements = getCPaths();
int nElements = elements.size();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
index ed1eb539193..900459958d7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
+ * Copyright (c) 2004, 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
@@ -119,7 +119,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
if (group.getResource().getType() == IResource.PROJECT) {
return group.getResource().getName();
}
- StringBuffer label = new StringBuffer(group.getResource().getProjectRelativePath().toString());
+ StringBuilder label = new StringBuilder(group.getResource().getProjectRelativePath().toString());
if (!group.getResource().exists()) {
label.append(fCreateLabel);
}
@@ -130,7 +130,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
public String getCPElementAttributeText(CPElementAttribute attrib) {
String notAvailable = CPathEntryMessages.CPElementLabelProvider_none;
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
String key = attrib.getKey();
if (key.equals(CPElement.SOURCEATTACHMENT)) {
buf.append(CPathEntryMessages.CPElementLabelProvider_source_attachment_label);
@@ -171,7 +171,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
switch (cpentry.getEntryKind()) {
case IPathEntry.CDT_LIBRARY : {
IPath libPath = (IPath)cpentry.getAttribute(CPElement.LIBRARY);
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
addBaseString(libPath, cpentry, str);
addExport(cpentry, str);
addParentInfo(cpentry, str);
@@ -181,7 +181,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
return path.lastSegment();
case IPathEntry.CDT_INCLUDE : {
IPath incPath = ((IPath)cpentry.getAttribute(CPElement.INCLUDE));
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
addBaseString(incPath, cpentry, str);
addExport(cpentry, str);
addParentInfo(cpentry, str);
@@ -189,14 +189,14 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
}
case IPathEntry.CDT_INCLUDE_FILE : {
IPath incFilePath = ((IPath)cpentry.getAttribute(CPElement.INCLUDE_FILE));
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
addBaseString(incFilePath, cpentry, str);
addExport(cpentry, str);
addParentInfo(cpentry, str);
return str.toString();
}
case IPathEntry.CDT_MACRO : {
- StringBuffer str = new StringBuffer((String)cpentry.getAttribute(CPElement.MACRO_NAME) + "=" //$NON-NLS-1$
+ StringBuilder str = new StringBuilder((String)cpentry.getAttribute(CPElement.MACRO_NAME) + "=" //$NON-NLS-1$
+ (String)cpentry.getAttribute(CPElement.MACRO_VALUE));
addBaseString(null, cpentry, str);
addExport(cpentry, str);
@@ -205,14 +205,14 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
}
case IPathEntry.CDT_MACRO_FILE : {
IPath macroFilePath = ((IPath)cpentry.getAttribute(CPElement.MACROS_FILE));
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
addBaseString(macroFilePath, cpentry, str);
addExport(cpentry, str);
addParentInfo(cpentry, str);
return str.toString();
}
case IPathEntry.CDT_CONTAINER : {
- StringBuffer str = new StringBuffer(path.toString());
+ StringBuilder str = new StringBuilder(path.toString());
try {
IPathEntryContainer container = CoreModel.getPathEntryContainer(cpentry.getPath(), cpentry.getCProject());
if (container != null) {
@@ -226,7 +226,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
}
case IPathEntry.CDT_SOURCE :
case IPathEntry.CDT_OUTPUT : {
- StringBuffer buf = new StringBuffer(path.makeRelative().toString());
+ StringBuilder buf = new StringBuilder(path.makeRelative().toString());
IResource resource = cpentry.getResource();
if (resource != null && !resource.exists()) {
buf.append(' ');
@@ -247,7 +247,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
* @param cpentry
* @param str
*/
- private void addParentInfo(CPElement cpentry, StringBuffer str) {
+ private void addParentInfo(CPElement cpentry, StringBuilder str) {
if (bShowParentInfo) {
CPElement parent = cpentry.getParentContainer();
if (parent != null) {
@@ -265,14 +265,14 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
}
}
- private void addExport(CPElement cpentry, StringBuffer str) {
+ private void addExport(CPElement cpentry, StringBuilder str) {
if (bShowExported && cpentry.isExported()) {
str.append(' ');
str.append(CPathEntryMessages.CPElementLabelProvider_export_label);
}
}
- private void addBaseString(IPath endPath, CPElement cpentry, StringBuffer str) {
+ private void addBaseString(IPath endPath, CPElement cpentry, StringBuilder str) {
IPath baseRef = (IPath)cpentry.getAttribute(CPElement.BASE_REF);
if (!baseRef.isEmpty()) {
if (baseRef.isAbsolute()) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
index 60e471ab034..c2cbf205d59 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
@@ -852,7 +852,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage
CPathEntryMessages.IncludeSymbolEntryPage_addSymbol_message, "", //$NON-NLS-1$
null);
} else {
- StringBuffer initialValue = new StringBuffer();
+ StringBuilder initialValue = new StringBuilder();
initialValue.append((String)existing.getAttribute(CPElement.MACRO_NAME));
initialValue.append('=');
initialValue.append((String)existing.getAttribute(CPElement.MACRO_VALUE));
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java
index 4173f91e3ac..28bdec93562 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java
@@ -910,7 +910,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB
CPathEntryMessages.IncludeSymbolEntryPage_addSymbol_message, "", //$NON-NLS-1$
null);
} else {
- StringBuffer initialValue = new StringBuffer();
+ StringBuilder initialValue = new StringBuilder();
initialValue.append((String)existing.getAttribute(CPElement.MACRO_NAME));
initialValue.append('=');
initialValue.append((String)existing.getAttribute(CPElement.MACRO_VALUE));
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java
index f20a537d649..6b3f6bc4d6b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DocumentAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2012 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -552,7 +552,7 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, IAdaptable {
try {
String curr= tracker.getLineDelimiter(i);
if (curr != null && !fLegalLineDelimiters.contains(curr)) {
- StringBuffer buf= new StringBuffer("New line delimiter added to new code: "); //$NON-NLS-1$
+ StringBuilder buf= new StringBuilder("New line delimiter added to new code: "); //$NON-NLS-1$
for (int k= 0; k < curr.length(); k++) {
buf.append(String.valueOf((int) curr.charAt(k)));
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java
index e83ea702b5b..a0cd9feb1a6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -379,7 +379,7 @@ public class CustomFiltersDialog extends SelectionDialog {
public static String convertToString(String[] patterns, String separator) {
int length= patterns.length;
- StringBuffer strBuf= new StringBuffer();
+ StringBuilder strBuf= new StringBuilder();
if (length > 0)
strBuf.append(patterns[0]);
else
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java
index 4fffffe7be6..63083bec8d3 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/indexview/IndexLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2014 QNX Software Systems and others.
+ * Copyright (c) 2006, 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
@@ -91,11 +91,11 @@ public class IndexLabelProvider extends LabelProvider {
String result = ((PDOMNamedNode)element).getDBName().getString();
if (element instanceof ICPPTemplateInstance) {
- StringBuffer buffer = null;
+ StringBuilder buffer = null;
if (element instanceof ICPPDeferredClassInstance) {
- buffer = new StringBuffer("Dfrd: "); //$NON-NLS-1$
+ buffer = new StringBuilder("Dfrd: "); //$NON-NLS-1$
} else {
- buffer = new StringBuffer("Inst: "); //$NON-NLS-1$
+ buffer = new StringBuilder("Inst: "); //$NON-NLS-1$
}
buffer.append(result);
buffer.append('<');
@@ -108,7 +108,7 @@ public class IndexLabelProvider extends LabelProvider {
buffer.append('>');
result = buffer.toString();
} else if (element instanceof ICPPClassTemplatePartialSpecialization) {
- StringBuffer buffer = new StringBuffer("Part: "); //$NON-NLS-1$
+ StringBuilder buffer = new StringBuilder("Part: "); //$NON-NLS-1$
buffer.append(result);
buffer.append('<');
ICPPTemplateArgument[] types = ((ICPPClassTemplatePartialSpecialization) element).getTemplateArguments();
@@ -122,8 +122,8 @@ public class IndexLabelProvider extends LabelProvider {
} else if (element instanceof ICPPSpecialization) {
ICPPSpecialization spec = (ICPPSpecialization) element;
- StringBuffer buffer = null;
- buffer = new StringBuffer("Spec: "); //$NON-NLS-1$
+ StringBuilder buffer = null;
+ buffer = new StringBuilder("Spec: "); //$NON-NLS-1$
buffer.append(result);
if (!(spec instanceof ICPPTemplateDefinition)
@@ -191,4 +191,4 @@ public class IndexLabelProvider extends LabelProvider {
return null;
}
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/LanguageVerifier.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/LanguageVerifier.java
index e79daa6d7b1..cd7b6cd4f4b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/LanguageVerifier.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/LanguageVerifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -43,7 +43,7 @@ public class LanguageVerifier {
public static String computeAffectedLanguages(Set<String> missingLanguages) {
Iterator<String> languages = missingLanguages.iterator();
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
while (languages.hasNext()) {
buffer.append('\n');
buffer.append(languages.next());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java
index 73f2789d947..31082aa1059 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorColoringConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 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
@@ -833,7 +833,7 @@ class CEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
private String loadPreviewContentFromFile(String filename) {
String line;
String separator= System.getProperty("line.separator"); //$NON-NLS-1$
- 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/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
index aa1c11f93e4..90376a12681 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
@@ -396,8 +396,8 @@ public class CEditorHoverConfigurationBlock implements IPreferenceConfigurationB
*/
@Override
public void performOk() {
- StringBuffer buf= new StringBuffer();
- StringBuffer maskBuf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
+ StringBuilder maskBuf= new StringBuilder();
for (int i= 0; i < fHoverConfigs.length; i++) {
buf.append(getContributedHovers()[i].getId());
buf.append(CEditorTextHoverDescriptor.VALUE_SEPARATOR);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
index 7149a6dac46..caa462d40b6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.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
@@ -205,7 +205,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
}
private void writeInclusionPreference(ModelElement changed, boolean isInDefaultCategory) {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
for (Object element : fElements) {
ModelElement item= (ModelElement) element;
boolean included= changed == item ? isInDefaultCategory : item.isInDefaultCategory();
@@ -219,7 +219,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
}
private void writeOrderPreference(ModelElement changed, boolean isSeparate) {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int i= 0;
for (Iterator<ModelElement> it= fElements.iterator(); it.hasNext(); i++) {
ModelElement item= it.next();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ProposalFilterPreferencesUtil.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ProposalFilterPreferencesUtil.java
index 14a09181b14..c008446cfce 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ProposalFilterPreferencesUtil.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/ProposalFilterPreferencesUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 QNX Software Systems
+ * Copyright (c) 2005, 2016 QNX Software Systems
* 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 class ProposalFilterPreferencesUtil {
* @return The list of filter names
*/
public static String getProposalFilternamesAsString() {
- StringBuffer filterNames = new StringBuffer("0;"); //$NON-NLS-1$
+ StringBuilder filterNames = new StringBuilder("0;"); //$NON-NLS-1$
filterNames.append(PreferencesMessages.ProposalFilterPreferencesUtil_defaultFilterName);
String[] names = getProposalFilterNames();
for (String name : names) {
@@ -145,7 +145,7 @@ public class ProposalFilterPreferencesUtil {
* @return A string representation of the Combo state
*/
public static String comboStateAsString(Combo combo) {
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
int selectionIndex = combo.getSelectionIndex();
text.append(selectionIndex);
String[] entries = combo.getItems();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskConfigurationBlock.java
index 991f1290d8e..8c27915d0d3 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/TodoTaskConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -276,8 +276,8 @@ public class TodoTaskConfigurationBlock extends OptionsConfigurationBlock {
private void updateModel(DialogField field) {
if (field == fTodoTasksList) {
- StringBuffer tags = new StringBuffer();
- StringBuffer prios = new StringBuffer();
+ StringBuilder tags = new StringBuilder();
+ StringBuilder prios = new StringBuilder();
List<TodoTask> list = fTodoTasksList.getElements();
for (int i = 0; i < list.size(); i++) {
if (i > 0) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/SnippetPreview.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/SnippetPreview.java
index e33654c0e52..88f699a11bd 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/SnippetPreview.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/formatter/SnippetPreview.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
@@ -57,7 +57,7 @@ public class SnippetPreview extends CPreview {
// This delimiter looks best for invisible characters
final String delimiter= "\n"; //$NON-NLS-1$
- final StringBuffer buffer= new StringBuffer();
+ final StringBuilder buffer= new StringBuilder();
for (PreviewSnippet snippet: fSnippets) {
String formattedSource;
try {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter.java
index c7fe8a5cf64..2b9debf9b0e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2011 IBM Corporation and others.
+ * Copyright (c) 2002, 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
@@ -478,7 +478,7 @@ public class DocumentAdapter implements IBuffer, IAdaptable, IDocumentListener {
try {
String curr= tracker.getLineDelimiter(i);
if (curr != null && !fLegalLineDelimiters.contains(curr)) {
- StringBuffer buf= new StringBuffer("New line delimiter added to new code: "); //$NON-NLS-1$
+ StringBuilder buf= new StringBuilder("New line delimiter added to new code: "); //$NON-NLS-1$
for (int k= 0; k < curr.length(); k++) {
buf.append(String.valueOf((int) curr.charAt(k)));
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/changes/DeleteFileChange.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/changes/DeleteFileChange.java
index 02e06245842..d4aa53242bb 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/changes/DeleteFileChange.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/changes/DeleteFileChange.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2014 Institute for Software, HSR Hochschule fuer Technik
+ * Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -72,7 +72,7 @@ public class DeleteFileChange extends Change {
} catch (CoreException e) {
// fall through. Take default encoding.
}
- StringBuffer sb= new StringBuffer();
+ StringBuilder sb= new StringBuilder();
BufferedReader br= null;
InputStream in= null;
try {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java
index c3e54178aa3..c1436c89c2b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/HTMLAnnotationHover.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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,7 +30,7 @@ public class HTMLAnnotationHover extends DefaultAnnotationHover {
*/
@Override
protected String formatSingleMessage(String message) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
HTMLPrinter.addPageProlog(buffer);
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
HTMLPrinter.addPageEpilog(buffer);
@@ -43,7 +43,7 @@ public class HTMLAnnotationHover extends DefaultAnnotationHover {
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
protected String formatMultipleMessages(List messages) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
HTMLPrinter.addPageProlog(buffer);
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(CUIMessages.CAnnotationHover_multipleMarkers));
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java
index 5b12df13719..624dff84963 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/PreprocessorRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2015 QNX Software Systems and others.
+ * Copyright (c) 2003, 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 @@ import org.eclipse.jface.text.rules.WordRule;
*/
public class PreprocessorRule extends WordRule {
- private StringBuffer fBuffer = new StringBuffer();
+ private StringBuilder fBuffer = new StringBuilder();
private IToken fMalformedToken;
/**
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SingleCharReader.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SingleCharReader.java
index f261c926387..0e9188ceefd 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SingleCharReader.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SingleCharReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SubstitutionTextReader.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SubstitutionTextReader.java
index 9aa2c1eac61..b876ab7502c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SubstitutionTextReader.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/SubstitutionTextReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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;
@@ -139,4 +139,4 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
fBuffer.setLength(0);
fIndex= 0;
}
-} \ No newline at end of file
+}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TabsToSpacesConverter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TabsToSpacesConverter.java
index b1ba7b10806..57be38ef2a5 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TabsToSpacesConverter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TabsToSpacesConverter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2010, 2016 Wind River Systems, 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
@@ -39,7 +39,7 @@ public class TabsToSpacesConverter implements IAutoEditStrategy {
fLineTracker= lineTracker;
}
- private int insertTabString(StringBuffer buffer, int offsetInLine) {
+ private int insertTabString(StringBuilder buffer, int offsetInLine) {
if (fTabRatio == 0)
return 0;
@@ -60,7 +60,7 @@ public class TabsToSpacesConverter implements IAutoEditStrategy {
int index= text.indexOf('\t');
if (index > -1) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
fLineTracker.set(command.text);
int lines= fLineTracker.getNumberOfLines();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
index 4aa7685f12c..793c104913a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -586,7 +586,7 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
index= index < getStepCount() ? index : 0;
final IMacroExpansionStep expansionStep= fInput.fExplorer.getExpansionStep(index);
IMacroBinding binding= expansionStep.getExpandedMacro();
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
buffer.append("#define ").append(binding.getName()); //$NON-NLS-1$
char[][] params= binding.getParameterList();
if (params != null) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java
index 2f467956162..c5ba4ad07a2 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/ProblemLocation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 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
@@ -89,7 +89,7 @@ public class ProblemLocation implements IProblemLocation {
@Override
public String toString() {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
buf.append("Id: ").append(getErrorCode(fId)).append('\n'); //$NON-NLS-1$
buf.append('[').append(fOffset).append(", ").append(fLength).append(']').append('\n'); //$NON-NLS-1$
String[] arg= fArguments;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
index 2a0049db1ab..67adf0d601d 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.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
@@ -144,7 +144,7 @@ public class ChangeCorrectionProposal implements ICCompletionProposal, ICommandA
@Override
public String getAdditionalProposalInfo() {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
buf.append("<p>"); //$NON-NLS-1$
try {
Change change= getChange();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java
index df08b2cd23f..ed5d2546561 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/WordCorrectionProposal.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -67,7 +67,7 @@ public class WordCorrectionProposal implements ICCompletionProposal {
fContext= context;
fRelevance= relevance;
- final StringBuffer buffer= new StringBuffer(80);
+ final StringBuilder buffer= new StringBuilder(80);
buffer.append("...<br>"); //$NON-NLS-1$
buffer.append(getHtmlRepresentation(arguments[1]));
@@ -161,7 +161,7 @@ public class WordCorrectionProposal implements ICCompletionProposal {
*/
public static String getHtmlRepresentation(final String string) {
final int length= string.length();
- final StringBuffer buffer= new StringBuffer(string);
+ final StringBuilder buffer= new StringBuilder(string);
for (int offset= length - 1; offset >= 0; offset--) {
for (int index= 0; index < IHtmlTagConstants.HTML_ENTITY_CHARACTERS.length; index++) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java
index e740c7cb584..558afda54dd 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 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
@@ -107,7 +107,7 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
int distance= 0;
String hash= null;
- final StringBuffer buffer= new StringBuffer(BUFFER_CAPACITY);
+ final StringBuilder buffer= new StringBuilder(BUFFER_CAPACITY);
final HashSet<RankedWordProposal> result= new HashSet<RankedWordProposal>(BUCKET_CAPACITY * hashs.size());
for (int index= 0; index < hashs.size(); index++) {
@@ -170,7 +170,7 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
int distance= 0;
int minimum= Integer.MAX_VALUE;
- StringBuffer buffer= new StringBuffer(BUFFER_CAPACITY);
+ StringBuilder buffer= new StringBuilder(BUFFER_CAPACITY);
final Object candidates= getCandidates(fHashProvider.getHash(word));
if (candidates == null)
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/DefaultPhoneticHashProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/DefaultPhoneticHashProvider.java
index e26d1ac7957..c9bb2e3a361 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/DefaultPhoneticHashProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/engine/DefaultPhoneticHashProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -203,7 +203,7 @@ public final class DefaultPhoneticHashProvider implements IPhoneticHashProvider
final char[] hashable= input.toCharArray();
final boolean has95= hasOneOf(meta95, input);
- final StringBuffer buffer= new StringBuffer(hashable.length);
+ final StringBuilder buffer= new StringBuilder(hashable.length);
int offset= 0;
if (hasOneOf(meta26, hashable, 0, 2))
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/StringMatcher.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/StringMatcher.java
index d24fc15fe39..6360a629d21 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/StringMatcher.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/StringMatcher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 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
@@ -241,7 +241,7 @@ public class StringMatcher {
Vector<String> temp= new Vector<String>();
int pos= 0;
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
while (pos < fLength) {
char c= fPattern.charAt(pos++);
switch (c) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java
index c835a409154..935cb0e5509 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/ConstructorMethodStub.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 QNX Software Systems and others.
+ * Copyright (c) 2004, 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 final class ConstructorMethodStub extends AbstractMethodStub {
@Override
public String createMethodDeclaration(ITranslationUnit tu, String className, IBaseClassInfo[] baseClasses, String lineDelimiter) throws CoreException {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(className);
buf.append("()"); //$NON-NLS-1$
if (fIsInline) {
@@ -53,7 +53,7 @@ public final class ConstructorMethodStub extends AbstractMethodStub {
if (fIsInline) {
return ""; //$NON-NLS-1$
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(className);
buf.append("::"); //$NON-NLS-1$
buf.append(className);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java
index f2e75bceff2..6bfa3e72a55 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/DestructorMethodStub.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 QNX Software Systems and others.
+ * Copyright (c) 2004, 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 final class DestructorMethodStub extends AbstractMethodStub {
@Override
public String createMethodDeclaration(ITranslationUnit tu, String className, IBaseClassInfo[] baseClasses, String lineDelimiter) throws CoreException {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if (fIsVirtual){
buf.append("virtual "); //$NON-NLS-1$
}
@@ -59,7 +59,7 @@ public final class DestructorMethodStub extends AbstractMethodStub {
if (fIsInline) {
return ""; //$NON-NLS-1$
}
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(className);
buf.append("::~"); //$NON-NLS-1$
buf.append(className);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/indexwizards/StringVariableSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/indexwizards/StringVariableSelectionDialog.java
index 024a36aa51a..22de76bd5ee 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/indexwizards/StringVariableSelectionDialog.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/indexwizards/StringVariableSelectionDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, 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
@@ -67,7 +67,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
Object[] selected = getResult();
if (selected != null && selected.length == 1) {
IStringVariable variable = (IStringVariable)selected[0];
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("${"); //$NON-NLS-1$
buffer.append(variable.getName());
if (fArgumentValue != null && fArgumentValue.length() > 0) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java
index 3c3e437839f..1a13cb58ed7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/CustomFiltersActionGroup.java
@@ -555,7 +555,7 @@ public class CustomFiltersActionGroup extends ActionGroup {
store.setValue(id, isEnabled);
}
- StringBuffer buf= new StringBuffer(fLRUFilterIdsStack.size() * 20);
+ StringBuilder buf= new StringBuilder(fLRUFilterIdsStack.size() * 20);
Iterator<String> iterIds= fLRUFilterIdsStack.iterator();
while (iterIds.hasNext()) {
buf.append(iterIds.next());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java
index 60a9e5490d2..aaedb8fa564 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractErrorParserBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 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
@@ -180,7 +180,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
@Deprecated
protected void saveErrorParsers(Preferences prefs, String[] parserIDs) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (int i = 0; i < parserIDs.length; i++) {
buf.append(parserIDs[i]).append(';');
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java
index 027472a435d..5db40f27f65 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 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
@@ -338,7 +338,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage {
}
}
private String arrayToString(Object[] array) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for (Object element : array) {
buf.append(element.toString()).append(';');
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractCPropertyTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractCPropertyTab.java
index df4c821d6bb..bafba61f78f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractCPropertyTab.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractCPropertyTab.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
@@ -528,7 +528,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
if (dialog.open() == Window.OK) {
IResource resource = (IResource) dialog.getFirstResult();
if (resource != null) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
return buf.append("${").append("workspace_loc:").append(resource.getFullPath()).append("}").toString(); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
}
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java
index 28330f47955..d2927dc6a7c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CWizardHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 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
@@ -258,7 +258,7 @@ public class CWizardHandler implements Cloneable {
@Deprecated
public static String removeSpaces(String s) {
char[] cs = s.toCharArray();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i=0; i<cs.length; i++) {
if (Character.isWhitespace(cs[i]))
continue;

Back to the top