diff --git a/pom.xml b/pom.xml index 2c53a93..7f59dbf 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 1.8 + 17 ${java.version} ${java.version} @@ -120,8 +120,8 @@ org.apache.maven.plugins maven-compiler-plugin - 1.8 - 1.8 + ${java.version} + ${java.version} UTF-8 diff --git a/src/main/java/cokr/xit/base/menu/Menu.java b/src/main/java/cokr/xit/base/menu/Menu.java index e355a93..dd69cf3 100644 --- a/src/main/java/cokr/xit/base/menu/Menu.java +++ b/src/main/java/cokr/xit/base/menu/Menu.java @@ -211,6 +211,8 @@ public class Menu extends AbstractEntity { * @return DataObject */ public DataObject toDataObject(List urls) { + if (action == null) + action = ""; boolean include = urls.contains(action) || urls.equals(UserInfo.ALL_ACTIONS); if (!include && Assert.isEmpty(children)) return null; diff --git a/src/main/java/cokr/xit/base/menu/web/MenuInjector.java b/src/main/java/cokr/xit/base/menu/web/MenuInjector.java index d684b27..b69a305 100644 --- a/src/main/java/cokr/xit/base/menu/web/MenuInjector.java +++ b/src/main/java/cokr/xit/base/menu/web/MenuInjector.java @@ -62,6 +62,8 @@ public class MenuInjector extends RequestInterceptor { private static final String[] STOP = {"login", "error", "downloadView"}; private String getRespType(HttpServletRequest hreq, ModelAndView mav) { + if (mav == null) + return NONE; String viewName = mav.getViewName(); for (String stop: STOP) { if (viewName.contains(stop))