Merge pull request #10879 from jsoref/spelling-kotlin

Spelling kotlin
This commit is contained in:
Ian Lynagh
2022-10-19 12:26:52 +01:00
committed by GitHub
4 changed files with 10 additions and 10 deletions

View File

@@ -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.
* <b>Doing so is a security risk</b> 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

View File

@@ -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);

View File

@@ -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)

View File

@@ -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.