Merge commit '9275eeaa7a7b4a8b24955728338a928ad902686d' into 6.0

# Conflicts:
#	docs/powered-by.md
This commit is contained in:
Wu Sheng 2018-08-31 19:39:28 +08:00
commit eb96151c95
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public class InstanceMetricAlarmAssertWorker extends AlarmAssertWorker<InstanceM
Instance instance = instanceDAO.getInstance(alarm.getInstanceId());
JsonObject osInfo = gson.fromJson(instance.getOsInfo(), JsonObject.class);
String serverName = Const.UNKNOWN;
if (osInfo.has("hostName")) {
if (osInfo != null && osInfo.has("hostName")) {
serverName = osInfo.get("hostName").getAsString();
}