fix: TypeReference<> generic 제거

dev
Jonguk. Lim 6 months ago
parent ec4127f665
commit 7e5fde2f0c

@ -117,7 +117,7 @@ public class TraceLoggerAspect {
HttpServletRequest request = attributes != null? attributes.getRequest(): null;
//traceApiLogging(JsonUtils.toObjByObj(pjp.getArgs()[0], JSONObject.class), request);
traceApiLogging(json.parse(json.stringify(pjp.getArgs()[0]), new TypeReference<JSONObject>() {}), request);
traceApiLogging(json.parse(json.stringify(pjp.getArgs()[0]), new TypeReference<>() {}), request);
Object result = pjp.proceed();
//noinspection rawtypes

@ -77,7 +77,7 @@ public class InfIrosServiceBean extends AbstractServiceBean implements InfIrosSe
String rslt = ApiUtil.callIrosApi(irosUrl + drugPrdtMcpnDtlInq, params);
IrosResponse<DrugPrdtMcpnDtl> result = null;
try {
result = json.parse(rslt, new TypeReference<IrosResponse<DrugPrdtMcpnDtl>>() {});
result = json.parse(rslt, new TypeReference<>() {});
} catch (Exception e) {
if(!isEmpty(e.getCause())){

@ -86,7 +86,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null);
String rslt = ApiUtil.callNimsApi(nimsUrl + bsshInfoStV1, dto);
NimsApiResult<NimsApiDto.BsshInfoSt> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.BsshInfoSt>>() {});
NimsApiResult<NimsApiDto.BsshInfoSt> result = json.parse(rslt, new TypeReference<>() {});
return result.getResponse();
}
@ -98,7 +98,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null);
String rslt = ApiUtil.callNimsApi(nimsUrl + productinfoKd, dto);
NimsApiResult<NimsApiDto.ProductInfoKd> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.ProductInfoKd>>() {});
NimsApiResult<NimsApiDto.ProductInfoKd> result = json.parse(rslt, new TypeReference<>() {});
return result.getResponse();
}
@ -110,7 +110,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null);
String rslt = ApiUtil.callNimsApi(nimsUrl + seqinfo, dto);
NimsApiResult<NimsApiDto.MnfSeqInfo> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.MnfSeqInfo>>() {});
NimsApiResult<NimsApiDto.MnfSeqInfo> result = json.parse(rslt, new TypeReference<>() {});
return result.getResponse();
}
@ -125,7 +125,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
// }
//
// String rslt = ApiUtil.callNimsApi(nimsUrl + officeinfo, dto);
// NimsApiResult<NimsApiDto.JurisdictionGovInfo> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.JurisdictionGovInfo>>() {});
// NimsApiResult<NimsApiDto.JurisdictionGovInfo> result = json.parse(rslt, new TypeReference<>() {});
// return result.getResponse();
// }
//
@ -142,7 +142,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
// }
//
// String rslt = ApiUtil.callNimsApi(nimsUrl + placeinfoV1, dto);
// NimsApiResult<NimsApiDto.StorageInfo> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.StorageInfo>>() {});
// NimsApiResult<NimsApiDto.StorageInfo> result = json.parse(rslt, new TypeReference<>() {});
// return result.getResponse();
// }
@ -155,7 +155,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe
ApiUtil.checkYmdError(dto.getEdt(), "edt");
//String rslt = ApiUtil.callNimsApi(nimsUrl + reportinfo, dto);
//NimsApiResult<NimsApiDto.DsuseRpt> result = json.parse(rslt, new TypeReference<NimsApiResult<NimsApiDto.DsuseRpt>>() {});
//NimsApiResult<NimsApiDto.DsuseRpt> result = json.parse(rslt, new TypeReference<>() {});
//return result.getResponse();
return getDsuseRptResponse();

@ -63,8 +63,7 @@ public class IrosRestfulTest {
request.uri(uri + urlParam);
});
IrosResponse<DrugPrdtMcpnDtl> parse = new JSON().parse(rslt.body(),
new TypeReference<IrosResponse<DrugPrdtMcpnDtl>>() {
IrosResponse<DrugPrdtMcpnDtl> parse = new JSON().parse(rslt.body(), new TypeReference<>() {
});
System.out.println(parse);

@ -193,7 +193,7 @@ public class ExchangeDtoTest {
XML xml = new XML();
//ApiUtil.validateXmlFromXmlStr(content, "src/main/resources/xsd/pack.xsd");
ExchangeDto dto2 = xml.parse(content, new TypeReference<ExchangeDto>() {});
ExchangeDto dto2 = xml.parse(content, new TypeReference<>() {});
log.info("dto: {}", dto2);
xml.write(System.out, dto2, true);
@ -226,7 +226,7 @@ public class ExchangeDtoTest {
XML xml = new XML();
//ApiUtil.validateXmlFromXmlStr(content, "src/main/resources/xsd/pack.xsd");
ExchangeDto dto2 = xml.parse(content, new TypeReference<ExchangeDto>() {});
ExchangeDto dto2 = xml.parse(content, new TypeReference<>() {});
log.info("dto: {}", dto2);
xml.write(System.out, dto2, true);

@ -87,7 +87,7 @@ public class ExchangepackDtoTest {
// xmlMapper.writeValue(System.out, dto);
XML xml = new XML();
ExchangepackDto dto = xml.parse(exchangeXml, new TypeReference<ExchangepackDto>() {});
ExchangepackDto dto = xml.parse(exchangeXml, new TypeReference<>() {});
log.info("dto: {}", dto);
xml.write(System.out, dto, true);
}

@ -53,7 +53,7 @@ public class PackDtoTest {
String content = new String(bytes);
ApiUtil.validateXmlFromXmlStr(content, "src/main/resources/xsd/pack.xsd");
PackDto dto = xml.parse(content, new TypeReference<PackDto>() {});
PackDto dto = xml.parse(content, new TypeReference<>() {});
log.info("dto: {}", dto);
xml.write(System.out, dto, true);

Loading…
Cancel
Save