Skip to content

Commit 82ea77e

Browse files
committed
Replace String concetanation with StringBuilder
1 parent ac9f5e8 commit 82ea77e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/LambdaUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ private static List<String> getArgumentTypeNames(IJavaElement parent) throws Cor
110110
String[] ptypes = method.getParameterTypes();
111111
for (String ps : ptypes) {
112112
@SuppressWarnings("restriction")
113-
String resolvedName = org.eclipse.jdt.internal.corext.util.JavaModelUtil.getResolvedTypeName(ps, type);
113+
StringBuilder resolvedName = new StringBuilder().append(org.eclipse.jdt.internal.corext.util.JavaModelUtil.getResolvedTypeName(ps, type));
114114
int arrayCount = Signature.getArrayCount(ps);
115115
for (int i = 0; i < arrayCount; i++) {
116-
resolvedName += "[]"; //$NON-NLS-1$
116+
resolvedName.append("[]"); //$NON-NLS-1$
117117
}
118-
psig.add(resolvedName);
118+
psig.add(resolvedName.toString());
119119
}
120120
return psig;
121121
}

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,11 +1596,11 @@ private void toggleFieldOrMethodBreakpoints(IWorkbenchPart part, ISelection sele
15961596
* Additional diagnosis info for bug 528321
15971597
*/
15981598
private static void logBadAnnotation(SimpleMarkerAnnotation annotation, CoreException e) {
1599-
String message = "Editor annotation with non existing marker found: "; //$NON-NLS-1$
1600-
message += "text: " + annotation.getText(); //$NON-NLS-1$
1601-
message += ", type: " + annotation.getType(); //$NON-NLS-1$
1602-
message += ", " + annotation.getMarker(); //$NON-NLS-1$
1603-
JDIDebugUIPlugin.log(message, e);
1599+
StringBuilder message = new StringBuilder("Editor annotation with non existing marker found: "); //$NON-NLS-1$
1600+
message.append("text: ").append(annotation.getText()); //$NON-NLS-1$
1601+
message.append(", type: ").append(annotation.getType()); //$NON-NLS-1$
1602+
message.append(", ").append(annotation.getMarker()); //$NON-NLS-1$
1603+
JDIDebugUIPlugin.log(message.toString(), e);
16041604
}
16051605

16061606
/**

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/DebugTypeSelectionDialog.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ public Image getImage(Object element) {
8383
public String getText(Object element) {
8484
if(element instanceof IType) {
8585
IType type = (IType) element;
86-
String label = type.getTypeQualifiedName();
86+
StringBuilder label = new StringBuilder().append(type.getTypeQualifiedName());
8787
String container = getDeclaringContainerName(type);
8888
if(container != null && !"".equals(container)) { //$NON-NLS-1$
89-
label += " - "+container; //$NON-NLS-1$
89+
label.append(" - ").append(container); //$NON-NLS-1$
9090
}
91-
return label;
91+
return label.toString();
9292
}
9393
return null;
9494
}

0 commit comments

Comments
 (0)