@RequestMapping(value = "/book/selectEcndmKindCdListAjax.do")
public String selectEcndmKindCdListAjax(
@RequestParam("ecndmCnsttFormCd") String ecndmCnsttFormCd,
HttpServletRequest request,
HttpServletResponse response,
ModelMap model) throws IOException ,InvocationTargetException, SQLException{
response.setContentType("application/x-json; charset=UTF-8");
try
{
List<CodeVO> ecndmKindCdCombo = cmmService.getCommonCodeList(ecndmCnsttFormCd);
model.addAttribute("divlists", ecndmKindCdCombo);
}
catch (IOException exception)
{
request.setAttribute("errorMessage", "에러가 발생했습니다.");
}
catch (InvocationTargetException e)
{
request.setAttribute("errorMessage", "에러가 발생했습니다.");
}
catch (SQLException e)
{
request.setAttribute("errorMessage", "에러가 발생했습니다.");
}
return "jsonView";
}
Unreachable catch block for IOException. This exception is never thrown from the try statement body
라고 에러가 나오고있어서.. 아래 코드 부분이 쿼리돌아서 list로 가져오는건데,
catch (Exception exception) 이렇게 하면 되긴한데.. 시큐어코딩에서 어긋난다해서요.
예를들어 List의 값이 null인 경우 예외처리 하는 방법 이런게 있을까요???
일단은 ArrayIndexOutOfBoundsException는 사용했는데
List<CodeVO> ecndmKindCdCombo = cmmService.getCommonCodeList(ecndmCnsttFormCd);