From 388f34e3b8afd2945245eddbff5c3f78a97bc57a Mon Sep 17 00:00:00 2001 From: pramilaniroshan Date: Mon, 21 Aug 2023 12:44:42 +0530 Subject: [PATCH] Fix try-it meta-info getting issue --- .../mgt/core/otp/mgt/service/OTPManagementServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/otp/mgt/service/OTPManagementServiceImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/otp/mgt/service/OTPManagementServiceImpl.java index d8872be921..bc9204eecb 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/otp/mgt/service/OTPManagementServiceImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/otp/mgt/service/OTPManagementServiceImpl.java @@ -276,9 +276,7 @@ public class OTPManagementServiceImpl implements OTPManagementService { public OneTimePinDTO generateOneTimePin(OneTimePinDTO oneTimePinDTO, boolean persistPin) throws OTPManagementException { String otpValue = UUID.randomUUID().toString(); - - Gson gson = new Gson(); - String metaInfo = gson.toJson(oneTimePinDTO.getMetaInfo()); + String metaInfo = oneTimePinDTO.getMetaInfo(); oneTimePinDTO.setMetaInfo(metaInfo); oneTimePinDTO.setOtpToken(otpValue);