diff --git a/IoTDBJDBC/src/main/java/com/oracle/demo/timg/iot/iotdbjdbc/messagehandler/iotdbutils/DeviceModelInstancesCache.java b/IoTDBJDBC/src/main/java/com/oracle/demo/timg/iot/iotdbjdbc/messagehandler/iotdbutils/DeviceModelInstancesCache.java index 8c687e7..a357f4f 100644 --- a/IoTDBJDBC/src/main/java/com/oracle/demo/timg/iot/iotdbjdbc/messagehandler/iotdbutils/DeviceModelInstancesCache.java +++ b/IoTDBJDBC/src/main/java/com/oracle/demo/timg/iot/iotdbjdbc/messagehandler/iotdbutils/DeviceModelInstancesCache.java @@ -451,10 +451,10 @@ public String getInstanceDisplayNameByInstanceId(@NotNull @NotEmpty String insta } // do we already have the info ? note that empty string and null are valid // responses here. - if (instanceIdToExternalKey.containsKey(instanceId)) { + if (instanceIdToInstanceName.containsKey(instanceId)) { // we have the key, the model could be a string, null blank etc if one hasn't // been set, but that's still valid. - return instanceIdToExternalKey.get(instanceId); + return instanceIdToInstanceName.get(instanceId); } // we don't have a cached version // let's try and locate it