Skip to content

Commit 1e37d13

Browse files
committed
~: clarification
1 parent 9cc55c8 commit 1e37d13

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/kotlinx-coroutines-core/src/internal/StackTraceRecovery.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,11 @@ private fun Array<StackTraceElement>.frameIndex(methodName: String) = indexOfFir
192192

193193
private fun StackTraceElement.elementWiseEquals(e: StackTraceElement): Boolean {
194194
/*
195-
* By default, STE.equals compares class-loader of enclosing class as well, which may lead to an interesting duplicates
196-
* in stack traces.
195+
* In order to work on Java 9 where modules and classloaders of enclosing class
196+
* are part of the comparison
197197
*/
198-
return lineNumber == e.lineNumber && methodName == e.methodName && fileName == e.fileName
198+
return lineNumber == e.lineNumber && methodName == e.methodName
199+
&& fileName == e.fileName && className == e.className
199200
}
200201

201202
@Suppress("ACTUAL_WITHOUT_EXPECT")

0 commit comments

Comments
 (0)