OSDN Git Service

SDK: fix SdkManager class not releasing FileInputStream
authorRaphael <raphael@google.com>
Wed, 5 Oct 2011 06:39:57 +0000 (23:39 -0700)
committerRaphael <raphael@google.com>
Wed, 5 Oct 2011 06:39:57 +0000 (23:39 -0700)
commit4c7bf6fe4dbf06f43d86b639ce5144ffeff7a626
tree1064fb7c11b1333e7940b3e1731d09502d749f6b
parent903ae4af34664fb8ffffa7a86e907814f860dab1
SDK: fix SdkManager class not releasing FileInputStream

In various parts of the code base, I see code that creates
a FileInputStrea and never closes it. Unfortunately on
Windows that means the file will stay locked for as long
as the java process is alive.

In this case the SdkManager wasn't closing to input streams
which makes the source.properties files locked, and thus
it makes it impossible to upgrade/delete the corresponding
packages.

There are more occurences of this elsewhere in the code.

Change-Id: I9f0a854b210411757eee8b4ebf8308b059206542
sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java