Fix multiple resource leaks by closing InputStream instances

The main fix is in BuiltInsPackageFragment, the rest is the improvement of
other usages of getResourceAsStream

 #KT-11433 Fixed
This commit is contained in:
Alexander Udalov
2016-03-29 13:20:14 +03:00
parent 8316953259
commit 0ea3b4ade4
6 changed files with 32 additions and 34 deletions
@@ -30,7 +30,7 @@ abstract class DeserializedPackageFragment(
fqName: FqName,
protected val storageManager: StorageManager,
module: ModuleDescriptor,
protected val loadResource: (path: String) -> InputStream?
private val loadResource: (path: String) -> InputStream?
) : PackageFragmentDescriptorImpl(module, fqName) {
// component dependency cycle
@set:Inject