Merge change 20389 into donut

* changes:
  Fix some display string that contained an unused %s and an NPE
This commit is contained in:
Android (Google) Code Review
2009-08-07 10:30:22 -07:00

View File

@@ -185,7 +185,7 @@ public class RepoSource implements IDescription {
monitor.setDescription("Parse XML");
monitor.incProgress(1);
parsePackages(xml, monitor);
if (mPackages.length == 0) {
if (mPackages == null || mPackages.length == 0) {
mDescription += "\nNo packages found.";
} else if (mPackages.length == 1) {
mDescription += "\nOne package found.";
@@ -370,10 +370,10 @@ public class RepoSource implements IDescription {
}
} catch (ParserConfigurationException e) {
monitor.setResult("Failed to create XML document builder for %1$s");
monitor.setResult("Failed to create XML document builder");
} catch (SAXException e) {
monitor.setResult("Failed to parse XML document %1$s");
monitor.setResult("Failed to parse XML document");
} catch (IOException e) {
monitor.setResult("Failed to read XML document");