Use StringBuilder instead of StringBuffer

This commit is contained in:
Niclas Finne 2022-05-18 01:49:32 +02:00
parent 8951db5b0e
commit 15d8882d21
5 changed files with 5 additions and 5 deletions

View File

@ -130,7 +130,7 @@ public class StabFile {
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("File: " + path + file + " starts at: " + startAddress + "\n");
for (int i = 0; i < functions.size(); i++) {
sb.append(" ").append(functions.get(i)).append("\n");

View File

@ -21,7 +21,7 @@ public class StabFunction {
}
public String toString() {
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append("Function: " + name);
if (params != null) {
sb.append("(");

View File

@ -264,7 +264,7 @@ public class LineNumberedBorder extends AbstractBorder {
* @return the line number for drawing
*/
private static String padLabel(int lineNumber, int length, boolean addSpace) {
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
buffer.append(lineNumber);
for (int count = (length - buffer.length()); count > 0; count--) {
buffer.insert(0, ' ');

View File

@ -180,7 +180,7 @@ public class DotDiagram extends JComponent {
// names = new String[diagrams];
// }
// names[index] = name;
// StringBuffer sb = new StringBuffer();
// StringBuilder sb = new StringBuilder();
// for (int i = 0, n = names.length; i < n; i++) {
// // Setup JLables...
// }

View File

@ -201,7 +201,7 @@ public class GDBStubs implements Runnable {
public static String stringToHex(String base)
{
StringBuffer buffer = new StringBuffer();
StringBuilder buffer = new StringBuilder();
int intValue;
for(int x = 0; x < base.length(); x++)
{