Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-05-23 03:37:21 -0400
committerAlexander Kurtakov2019-05-23 04:20:48 -0400
commit580d96e6cbdac2e14d24620676b5073a6fd0e20f (patch)
treebc91366a0e0016b97d97425b6efc8cc29ed709cc /changelog
parent5c190198ba49a9e6cb03a0b4c233c1223f65e410 (diff)
downloadorg.eclipse.linuxtools-580d96e6cbdac2e14d24620676b5073a6fd0e20f.tar.gz
org.eclipse.linuxtools-580d96e6cbdac2e14d24620676b5073a6fd0e20f.tar.xz
org.eclipse.linuxtools-580d96e6cbdac2e14d24620676b5073a6fd0e20f.zip
Use StringBuilder instead of StringBuffer where possible.
Change-Id: Ib62a825af23774e09f51c50113aded3e9e2b8695 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/142647 Tested-by: Linux Tools Bot <linuxtools-bot@eclipse.org>
Diffstat (limited to 'changelog')
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/editors/GNUFileEntryRule.java2
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/core/tests/ChangeLogWriterTest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/editors/GNUFileEntryRule.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/editors/GNUFileEntryRule.java
index 066cb48a01..78dc113bc0 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/editors/GNUFileEntryRule.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/editors/GNUFileEntryRule.java
@@ -48,7 +48,7 @@ public class GNUFileEntryRule implements IPredicateRule {
protected static final int UNDEFINED = -1;
/** Buffer used for pattern detection */
- private StringBuffer fBuffer = new StringBuffer();
+ private StringBuilder fBuffer = new StringBuilder();
private String fStartingSequence = "* ";
diff --git a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/core/tests/ChangeLogWriterTest.java b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/core/tests/ChangeLogWriterTest.java
index 7f8ba84186..5e0a564b83 100644
--- a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/core/tests/ChangeLogWriterTest.java
+++ b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/core/tests/ChangeLogWriterTest.java
@@ -205,7 +205,7 @@ public class ChangeLogWriterTest {
String expectedContent = expectedChangeLogEntry + changeLogContent;
// Read in content written to file
- StringBuffer actualContent = new StringBuffer();
+ StringBuilder actualContent = new StringBuilder();
try (BufferedReader br = new BufferedReader(new InputStreamReader(
new FileInputStream(changelogFile.getLocation().toFile())))) {
String line;
@@ -273,7 +273,7 @@ public class ChangeLogWriterTest {
+ defaultContent + "\n";
// Read in content written to file
- StringBuffer actualContent = new StringBuffer();
+ StringBuilder actualContent = new StringBuilder();
try (BufferedReader br = new BufferedReader(new InputStreamReader(
new FileInputStream(emptyChangeLogFile.getLocation().toFile())))) {
String line;

Back to the top