OSDN Git Service

SDK: fix SdkManager class not releasing FileInputStream. Do not merge.
authorRaphael <raphael@google.com>
Wed, 5 Oct 2011 06:39:57 +0000 (23:39 -0700)
committerRaphael Moll <raphael@google.com>
Wed, 5 Oct 2011 06:59:41 +0000 (23:59 -0700)
commit644764ce5452f9534aedf94857055a361f97e6f3
tree357f9bc867fe394bd60b4d0035fd6ed4c094e0d6
parente75843be78e31ece5d30ec8a6cc51dad45d6d9cb
SDK: fix SdkManager class not releasing FileInputStream. Do not merge.

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.

(cherry picked from commit 4c7bf6fe4dbf06f43d86b639ce5144ffeff7a626)

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