Replaced StringBuffers with StringBuilders

Esse commit está contido em:
Emmanuel Bourg
2013-11-15 23:11:08 +01:00
commit e67a50c904
6 arquivos alterados com 7 adições e 7 exclusões
@@ -438,7 +438,7 @@ public class AlphaMaskDemo implements Runnable {
if (flavor != null) {
Reader reader = flavor.getReaderForText(t);
char[] buf = new char[512];
StringBuffer b = new StringBuffer();
StringBuilder b = new StringBuilder();
int count;
// excise excess NUL characters (bug in firefox, java
// or my code, not sure which). someone got the
@@ -200,7 +200,7 @@ public class AlphaMaskDemo2 implements Runnable {
if (flavor != null) {
Reader reader = flavor.getReaderForText(t);
char[] buf = new char[512];
StringBuffer b = new StringBuffer();
StringBuilder b = new StringBuilder();
int count;
// excise excess NUL characters (bug in firefox,
// java
@@ -256,8 +256,8 @@ public class FilteredTextField extends JTextField {
balloon.hide();
}
}
StringBuffer buffer =
new StringBuffer(FilteredTextField.this.getText());
StringBuilder buffer =
new StringBuilder(FilteredTextField.this.getText());
if (offset >= 0 && offset <= buffer.length()) {
buffer.insert(offset, str);
String strBuf = buffer.toString();
@@ -1747,7 +1747,7 @@ public abstract class Advapi32Util {
* @return A environment block
*/
public static String getEnvironmentBlock(Map<String, String> environment) {
StringBuffer out = new StringBuffer();
StringBuilder out = new StringBuilder();
for (Entry<String, String> entry : environment.entrySet()) {
if (entry.getValue() != null) {
out.append(entry.getKey() + "=" + entry.getValue() + "\0");
+1 -1
Ver Arquivo
@@ -1272,7 +1272,7 @@ public final class Native implements Version {
// No String.replace available in 1.4
static String replace(String s1, String s2, String str) {
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
while (true) {
int idx = str.indexOf(s1);
if (idx == -1) {
+1 -1
Ver Arquivo
@@ -28,7 +28,7 @@ public class NativeTest extends TestCase {
private static final String UNICODE = "[\u0444]";
public void testLongStringGeneration() {
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
final int MAX = Platform.isWindowsCE() ? 200000 : 2000000;
for (int i=0;i < MAX;i++) {
buf.append('a');