Fix NPE in the parsing of property file.

this could happen if the log object is null and the parsing fails.

Change-Id: I6dbcafab26c5405efba20b30f511104fcee5bf78
This commit is contained in:
Xavier Ducrohet
2009-10-13 10:28:16 -07:00
parent 5ca98eb008
commit 73ecae2fdc

View File

@@ -605,8 +605,10 @@ public final class SdkManager {
if (m.matches()) { if (m.matches()) {
map.put(m.group(1), m.group(2)); map.put(m.group(1), m.group(2));
} else { } else {
if (log != null) {
log.warning("Error parsing '%1$s': \"%2$s\" is not a valid syntax", log.warning("Error parsing '%1$s': \"%2$s\" is not a valid syntax",
buildProp.getAbsolutePath(), line); buildProp.getAbsolutePath(), line);
}
return null; return null;
} }
} }