Fix stacktrace check for KT-27718. This work-around should be removed after fix of IDEA-203651
#KT-27718 Fixed
This commit is contained in:
@@ -11,8 +11,9 @@ interface KotlinRootType {
|
||||
fun isSameRootType(kotlinRoot: KotlinRootType, other: Any?): Boolean {
|
||||
if (kotlinRoot.isTestRoot()) {
|
||||
if (other is JavaResourceRootType || other is JavaSourceRootType) {
|
||||
val invokeLevel = 3
|
||||
val stack = Thread.currentThread().stackTrace
|
||||
if (stack.size > 2 && "isTestSource" == stack[2].methodName && "com.intellij.openapi.roots.impl.SourceFolderImpl" == stack[2].className) {
|
||||
if (stack.size > invokeLevel && "isTestSource" == stack[invokeLevel].methodName && "com.intellij.openapi.roots.impl.SourceFolderImpl" == stack[invokeLevel].className) {
|
||||
if (JavaResourceRootType.TEST_RESOURCE == other) {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user