headers.length = 0 일때, NullpointException 예외 처리.

This commit is contained in:
cho
2026-01-20 15:53:30 +09:00
parent 333f145537
commit 4b64cfab13
@@ -1,5 +1,6 @@
package com.eactive.eai.common.util;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -34,7 +35,13 @@ public class HttpAdapterExtraLogUtil {
}
public static void insertHttpAdapterExtraLog(String guid, int serviceProcessNumber, String adapterGroupName, String adapterName, Header[] headers, String url, String httpMethod, int httpStatus){
List<HttpAdapterExtraHeaderVo> headerVoList = convertHeaderToListOfHttpAdapterExtraHeaderVo(headers);
List<HttpAdapterExtraHeaderVo> headerVoList = new ArrayList<HttpAdapterExtraHeaderVo>();
if ( headers != null && headers.length != 0 ) {
headerVoList = convertHeaderToListOfHttpAdapterExtraHeaderVo(headers);
}
insertHttpAdapterExtraLog(guid, serviceProcessNumber, adapterGroupName, adapterName, headerVoList, url, httpMethod, httpStatus);
}