User: xxdark Date: 11 Nov 21 20:48 Revision: a6b414e726ead2f28ce8635f641602ae60d9bd3d Summary: Fix leak of file descriptors (#1706) TeamCity URL: https://ci.denwav.dev/viewModification.html?tab=vcsModificationFiles&modId=7836&personal=false Index: src/main/kotlin/platform/mixin/util/AsmUtil.kt =================================================================== --- src/main/kotlin/platform/mixin/util/AsmUtil.kt (revision 3cd48917d95de70970e3d30d22ebb6d91265d3ed) +++ src/main/kotlin/platform/mixin/util/AsmUtil.kt (revision a6b414e726ead2f28ce8635f641602ae60d9bd3d) @@ -169,7 +169,7 @@ } val classFile = parentDir.findChild("${fqn.substringAfterLast('.')}.class") ?: return null val node = ClassNode() - ClassReader(classFile.inputStream).accept(node, 0) + classFile.inputStream.use { ClassReader(it).accept(node, 0) } node } else { val node = ClassNode()