Fix add metadata method NPE.

This commit is contained in:
nkorange 2019-10-29 15:36:12 +08:00
parent be99def1c9
commit f4f90a08ed

View File

@ -149,6 +149,9 @@ public class Instance {
}
public void addMetadata(String key, String value) {
if (this.metadata == null) {
this.metadata = new HashMap<String, String>();
}
this.metadata.put(key, value);
}