From c1c46daa0171ede9f0f91ce68842620e40934b7c Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Fri, 13 Sep 2019 16:20:47 +0300 Subject: [PATCH] Use en_US.UTF-8 locale instead of default locale to work around errors in tr_TR.UTF-8 locale in coroutines-specific code. #KT-33821: Fixed --- .../codegen/coroutines/ChangeBoxingMethodTransformer.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt index 0d12702abaa..575c4f35ef2 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -15,10 +15,12 @@ import org.jetbrains.kotlin.utils.sure import org.jetbrains.org.objectweb.asm.Opcodes import org.jetbrains.org.objectweb.asm.tree.MethodInsnNode import org.jetbrains.org.objectweb.asm.tree.MethodNode +import java.util.* private val BOXING_CLASS_INTERNAL_NAME = RELEASE_COROUTINES_VERSION_SETTINGS.coroutinesJvmInternalPackageFqName().child(Name.identifier("Boxing")).topLevelClassInternalName() +@UseExperimental(ExperimentalStdlibApi::class) object ChangeBoxingMethodTransformer : MethodTransformer() { private val wrapperToInternalBoxing: Map @@ -26,7 +28,7 @@ object ChangeBoxingMethodTransformer : MethodTransformer() { val map = hashMapOf() for (primitiveType in JvmPrimitiveType.values()) { val name = primitiveType.wrapperFqName.topLevelClassInternalName() - map[name] = "box${primitiveType.javaKeywordName.capitalize()}" + map[name] = "box${primitiveType.javaKeywordName.capitalize(Locale.US)}" } wrapperToInternalBoxing = map }