diff --git a/src/main/java/cokr/xit/base/syslog/service/bean/LogFilter.java b/src/main/java/cokr/xit/base/syslog/service/bean/LogFilter.java index f94cd1f..6c3272b 100644 --- a/src/main/java/cokr/xit/base/syslog/service/bean/LogFilter.java +++ b/src/main/java/cokr/xit/base/syslog/service/bean/LogFilter.java @@ -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 model = mav.getModel(); @@ -143,16 +142,14 @@ public class LogFilter extends AbstractComponent { */ protected void setDownloadData(ServiceLog log, Map 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(); }