Skip to content

Commit b9815d5

Browse files
committed
5
1 parent d3334a9 commit b9815d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

smithy-build/src/main/java/software/amazon/smithy/build/PluginContext.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,8 @@ private boolean isSource(FromSourceLocation sourceLocation) {
239239
for (String sourceUri : sourceUris) {
240240
// Compare starting after the protocol (the source uri will always be "file", because we created it
241241
// from a path).
242-
int sourceCompareStart = "file:".length();
243-
int regionCompareLength = sourceUri.length() - sourceCompareStart;
244-
if (location.regionMatches(offsetFromStart, sourceUri, sourceCompareStart, regionCompareLength)) {
242+
int regionCompareLength = sourceUri.length() - 5;
243+
if (location.regionMatches(offsetFromStart, sourceUri, 5, regionCompareLength)) {
245244
return true;
246245
}
247246
}

0 commit comments

Comments
 (0)