Fix FqName.startsWith for fqNames shorter when the segment
This commit is contained in:
@@ -163,7 +163,8 @@ public final class FqNameUnsafe {
|
||||
return false;
|
||||
|
||||
int firstDot = fqName.indexOf('.');
|
||||
return fqName.regionMatches(0, segment.asString(), 0, firstDot == -1 ? fqName.length() : firstDot);
|
||||
String segmentAsString = segment.asString();
|
||||
return fqName.regionMatches(0, segmentAsString, 0, firstDot == -1 ? Math.max(fqName.length(), segmentAsString.length()) : firstDot);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user