mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
Replace instances of StringBuffer with StringBuilder
This commit is contained in:
@@ -1224,7 +1224,7 @@ public class JSONArray {
|
||||
*/
|
||||
public String join(String separator) {
|
||||
int len = this.size();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < len; i += 1) {
|
||||
if (i > 0) {
|
||||
|
||||
@@ -249,7 +249,7 @@ class JSONTokener {
|
||||
*/
|
||||
public String nextString(char quote) {
|
||||
char c;
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (;;) {
|
||||
c = this.next();
|
||||
switch (c) {
|
||||
@@ -305,7 +305,7 @@ class JSONTokener {
|
||||
* @return A string.
|
||||
*/
|
||||
public String nextTo(char delimiter) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (;;) {
|
||||
char c = this.next();
|
||||
if (c == delimiter || c == 0 || c == '\n' || c == '\r') {
|
||||
@@ -327,7 +327,7 @@ class JSONTokener {
|
||||
*/
|
||||
public String nextTo(String delimiters) {
|
||||
char c;
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (;;) {
|
||||
c = this.next();
|
||||
if (delimiters.indexOf(c) >= 0 || c == 0 ||
|
||||
@@ -374,7 +374,7 @@ class JSONTokener {
|
||||
* formatting character.
|
||||
*/
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) {
|
||||
sb.append(c);
|
||||
c = this.next();
|
||||
|
||||
@@ -711,7 +711,7 @@ public class Table {
|
||||
cellData = textpContent; // nothing fancy, the text is in the text:p element
|
||||
} else {
|
||||
XML[] textpKids = textp.getChildren();
|
||||
StringBuffer cellBuffer = new StringBuffer();
|
||||
StringBuilder cellBuffer = new StringBuilder();
|
||||
for (XML kid : textpKids) {
|
||||
String kidName = kid.getName();
|
||||
if (kidName == null) {
|
||||
@@ -770,7 +770,7 @@ public class Table {
|
||||
}
|
||||
|
||||
|
||||
private void odsAppendNotNull(XML kid, StringBuffer buffer) {
|
||||
private void odsAppendNotNull(XML kid, StringBuilder buffer) {
|
||||
String content = kid.getContent();
|
||||
if (content != null) {
|
||||
buffer.append(content);
|
||||
|
||||
Reference in New Issue
Block a user