diff --git a/java/kotlin-extractor/src/main/java/com/semmle/util/expansion/ExpansionEnvironment.java b/java/kotlin-extractor/src/main/java/com/semmle/util/expansion/ExpansionEnvironment.java index a8008ca6299..47bbb1d2029 100644 --- a/java/kotlin-extractor/src/main/java/com/semmle/util/expansion/ExpansionEnvironment.java +++ b/java/kotlin-extractor/src/main/java/com/semmle/util/expansion/ExpansionEnvironment.java @@ -123,7 +123,7 @@ public class ExpansionEnvironment { } /** - * This the old default constructor, which always enables command substutitions. + * This the old default constructor, which always enables command substitutions. * Doing so is a security risk whenever the string you expand may come * from an untrusted source, so you should only do that when you explicitly want * to do it and have decided that it is safe. (And then use the constructor that diff --git a/java/kotlin-extractor/src/main/java/com/semmle/util/files/FileUtil.java b/java/kotlin-extractor/src/main/java/com/semmle/util/files/FileUtil.java index 6c3e754310e..81a9f46a71f 100644 --- a/java/kotlin-extractor/src/main/java/com/semmle/util/files/FileUtil.java +++ b/java/kotlin-extractor/src/main/java/com/semmle/util/files/FileUtil.java @@ -1033,11 +1033,11 @@ public class FileUtil } /** - * Santize path string To handle windows drive letters and cross-platform builds. + * Sanitize path string To handle windows drive letters and cross-platform builds. * @param pathString to be sanitized * @return sanitized path string */ - private static String santizePathString(String pathString) { + private static String sanitizePathString(String pathString) { // Replace ':' by '_', as the extractor does - to handle Windows drive letters pathString = pathString.replace(':', '_'); @@ -1059,7 +1059,7 @@ public class FileUtil */ public static File appendAbsolutePath (File root, String absolutePath) { - absolutePath = santizePathString(absolutePath); + absolutePath = sanitizePathString(absolutePath); return new File(root, absolutePath).getAbsoluteFile(); } @@ -1075,7 +1075,7 @@ public class FileUtil */ public static Path appendAbsolutePath(Path root, String absolutePathString){ - absolutePathString = santizePathString(absolutePathString); + absolutePathString = sanitizePathString(absolutePathString); Path path = Paths.get(absolutePathString); diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinExtractorExtension.kt b/java/kotlin-extractor/src/main/kotlin/KotlinExtractorExtension.kt index f7afd38dadc..a31bfee0b4f 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinExtractorExtension.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinExtractorExtension.kt @@ -400,7 +400,7 @@ private abstract class TrapFileWriter(val logger: FileLogger, trapName: String, fun getTempWriter(): BufferedWriter { if (this::tempFile.isInitialized) { - logger.error("Temp writer reinitiailised for $realFile") + logger.error("Temp writer reinitialized for $realFile") } tempFile = File.createTempFile(realFile.getName() + ".", ".trap.tmp" + extension, parentDir) return getWriter(tempFile) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index 00de58e0a30..69cb6389bae 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -944,7 +944,7 @@ open class KotlinUsesExtractor( private val jvmWildcardAnnotation = FqName("kotlin.jvm.JvmWildcard") - private val jvmWildcardSuppressionAnnotaton = FqName("kotlin.jvm.JvmSuppressWildcards") + private val jvmWildcardSuppressionAnnotation = FqName("kotlin.jvm.JvmSuppressWildcards") private fun arrayExtendsAdditionAllowed(t: IrSimpleType): Boolean = // Note the array special case includes Array<*>, which does permit adding `? extends ...` (making `? extends Object[]` in that case) @@ -977,7 +977,7 @@ open class KotlinUsesExtractor( when { t.hasAnnotation(jvmWildcardAnnotation) -> true !addByDefault -> false - t.hasAnnotation(jvmWildcardSuppressionAnnotaton) -> false + t.hasAnnotation(jvmWildcardSuppressionAnnotation) -> false v == Variance.IN_VARIANCE -> !(t.isNullableAny() || t.isAny()) v == Variance.OUT_VARIANCE -> extendsAdditionAllowed(t) else -> false @@ -1225,9 +1225,9 @@ open class KotlinUsesExtractor( } fun hasWildcardSuppressionAnnotation(d: IrDeclaration) = - d.hasAnnotation(jvmWildcardSuppressionAnnotaton) || + d.hasAnnotation(jvmWildcardSuppressionAnnotation) || // Note not using `parentsWithSelf` as that only works if `d` is an IrDeclarationParent - d.parents.any { (it as? IrAnnotationContainer)?.hasAnnotation(jvmWildcardSuppressionAnnotaton) == true } + d.parents.any { (it as? IrAnnotationContainer)?.hasAnnotation(jvmWildcardSuppressionAnnotation) == true } /** * Class to hold labels for generated classes around local functions, lambdas, function references, and property references.