Hi, We have a code snippet,
Map<String, Object> assetMeta = damAsset.getMetadata();
boolean isActiveAsset;
boolean hasOnTime = (assetMeta.get("idam:offTime") != null);
boolean hasOffTime = (assetMeta.get("idam:onTime") != null);
Date offTimeDate = hasOnTime ? ((XMPDateTime) assetMeta.get("idam:offTime")).getCalendar().getTime() : null;
Date onTimeDate = hasOffTime ? ((XMPDateTime) assetMeta.get("idam:onTime")).getCalendar().getTime() : null;
Basically it is getting on and off time of an asset. But the casting in line 5 and 6 is providing class cast exception. Please suggest a way to get rid of the same?