aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-09-24 07:41:30 -0700
committerXavier Ducrohet <xav@android.com>2010-09-24 07:41:30 -0700
commit4fb194e77970aa935067c589c90a6a6e03d3e6ea (patch)
tree01159192b17ee0deb6f57505aed1da4977be15fb
parent469f825806a735eaf11285f3461536846ebd2734 (diff)
downloadsdk-4fb194e77970aa935067c589c90a6a6e03d3e6ea.zip
sdk-4fb194e77970aa935067c589c90a6a6e03d3e6ea.tar.gz
sdk-4fb194e77970aa935067c589c90a6a6e03d3e6ea.tar.bz2
Fix target loading when sdk.properties is not present.
Older (obsolete) targets would fail to load if sdk.properties was not present. Since the content is optional anyway, it's ok to load the target. Change-Id: I6539be1450e72096de7b651e1c9137b41060e315
-rw-r--r--sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java
index ad9e390..32c5838 100644
--- a/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java
+++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java
@@ -335,8 +335,10 @@ public final class SdkManager {
// Ant properties
FileWrapper sdkPropFile = new FileWrapper(platformFolder, SdkConstants.FN_SDK_PROP);
- Map<String, String> antProp = ProjectProperties.parsePropertyFile(
- sdkPropFile, log);
+ Map<String, String> antProp = null;
+ if (sdkPropFile.isFile()) { // obsolete platforms don't have this.
+ antProp = ProjectProperties.parsePropertyFile(sdkPropFile, log);
+ }
if (antProp != null) {
map.putAll(antProp);