instanceof 관련 수정

master
mjkhan21 7 months ago
parent 49ec1c9c0f
commit 150413f787

@ -119,8 +119,7 @@ public class LogFilter extends AbstractComponent {
*/
protected boolean downloadFilter(ServiceLog log) {
Object returned = log.getReturned();
if (returned instanceof ModelAndView) {
ModelAndView mav = (ModelAndView)returned;
if (returned instanceof ModelAndView mav) {
if (!"downloadView".equals(mav.getViewName())) return false;
Map<String, Object> model = mav.getModel();
@ -143,16 +142,14 @@ public class LogFilter extends AbstractComponent {
*/
protected void setDownloadData(ServiceLog log, Map<String, Object> model) {
Object obj = model.get("downloadData");
if (!(obj instanceof List)) return;
if (!(obj instanceof List<?> list)) return;
List<?> list = (List<?>)obj;
if (list.isEmpty()) return;
int dataSize = -1;
Object first = list.get(0);
if (first instanceof DataObject) {
DataObject row = (DataObject)first;
if (first instanceof DataObject row) {
if (row.containsKey("TOT_CNT"))
dataSize = row.number("TOT_CNT").intValue();
}

Loading…
Cancel
Save