more cleanup

This commit is contained in:
honfika@gmail.com
2015-07-05 21:54:30 +02:00
parent bf2c6cb822
commit dcb20d84f0
20 changed files with 23 additions and 35 deletions

View File

@@ -411,7 +411,7 @@ public class MainFrameRibbonMenu extends MainFrameMenu {
@Override
public void addMenuItem(String path, String title, String icon, ActionListener action, int priority, ActionListener subLoader, boolean isLeaf) {
String parentPath = path.contains("/") ? path.substring(0, path.lastIndexOf("/")) : "";
String parentPath = path.contains("/") ? path.substring(0, path.lastIndexOf('/')) : "";
if (!menuSubs.containsKey(parentPath)) {
throw new IllegalArgumentException("No parent menu exists: " + parentPath);
}