Skip to content

Commit f553d6e

Browse files
committed
Don't pass null values to Signature.createArraySignature(String, int)
See eclipse-jdt/eclipse.jdt.core#4448
1 parent 193c879 commit f553d6e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,11 @@ private static String resolveTypeSignature(IMethod method, String typeSignature)
12671267
return "Ljava/lang/Object;"; //$NON-NLS-1$
12681268
}
12691269
String bound = Signature.createTypeSignature(bounds[0], false);
1270-
return Signature.createArraySignature(resolveTypeSignature(method, bound), count);
1270+
String signature = resolveTypeSignature(method, bound);
1271+
if (signature == null) {
1272+
return null;
1273+
}
1274+
return Signature.createArraySignature(signature, count);
12711275
}
12721276
// the type name cannot be resolved
12731277
return null;

org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,11 @@ private String getTypeSignature(Type type) {
394394
}
395395
case ASTNode.ARRAY_TYPE: {
396396
ArrayType a = (ArrayType) type;
397-
return Signature
398-
.createArraySignature(
399-
getTypeSignature(a.getElementType()),
400-
a.getDimensions());
397+
String typeSignature = getTypeSignature(a.getElementType());
398+
if (typeSignature == null) {
399+
return null;
400+
}
401+
return Signature.createArraySignature(typeSignature, a.getDimensions());
401402
}
402403
case ASTNode.PARAMETERIZED_TYPE: {
403404
// we don't need to care about the other scoping types only the

0 commit comments

Comments
 (0)