diff --git a/modules/qi-core/src/main/java/org/jpos/qi/QINavigator.java b/modules/qi-core/src/main/java/org/jpos/qi/QINavigator.java index b3af3af415..caa711fa04 100644 --- a/modules/qi-core/src/main/java/org/jpos/qi/QINavigator.java +++ b/modules/qi-core/src/main/java/org/jpos/qi/QINavigator.java @@ -70,11 +70,7 @@ private void initNavigator() { } perms.put(route, perm); e.getChildren("property").stream().filter(p -> "entityName".equals(p.getAttributeValue("name"))).forEach( - p -> { - if (routes.get(p.getAttributeValue("value")) == null ) { - routes.put(p.getAttributeValue("value"), route); - } - }); + p -> routes.putIfAbsent(p.getAttributeValue("value"), route)); } catch (ClassNotFoundException ex) { app.getLog().error(ex); } @@ -105,7 +101,7 @@ public void navigateTo(String navigationState) { } super.navigateTo(navigationState); if (app.sidebar() != null) { - app.sidebar().markAsSelected(navigationState.substring(1).split("/|,|\\?")[0]); + app.sidebar().markAsSelected(navigationState.substring(1).split("[/,?]")[0]); } } catch( IllegalArgumentException e) { QI.getQI().displayNotification(e.getMessage());