diff --git a/src/main/java/io/github/astrapi69/mystic/crypt/panel/dbtree/SecretKeyTreeWithContentPanel.java b/src/main/java/io/github/astrapi69/mystic/crypt/panel/dbtree/SecretKeyTreeWithContentPanel.java index b6f90095..fdd81b76 100644 --- a/src/main/java/io/github/astrapi69/mystic/crypt/panel/dbtree/SecretKeyTreeWithContentPanel.java +++ b/src/main/java/io/github/astrapi69/mystic/crypt/panel/dbtree/SecretKeyTreeWithContentPanel.java @@ -334,7 +334,7 @@ protected void onDuplicateSelectedTreeNode(MouseEvent mouseEvent) MaxIndexFinderTreeNodeVisitor>, Long, BaseTreeNode>, Long>> maxIndexFinderTreeNodeVisitor; Long maxIndex; - Long nextId; + long nextId; // implement the visitor for find the max index maxIndexFinderTreeNodeVisitor = new MaxIndexFinderTreeNodeVisitor<>() { @@ -756,9 +756,7 @@ protected void onDeleteTableEntry() protected void onEditTableEntry() { - getTblTreeEntryTable().getSingleSelectedRowData().ifPresent(tableEntry -> { - showEditMysticCryptEntryDialog(tableEntry); - }); + getTblTreeEntryTable().getSingleSelectedRowData().ifPresent(this::showEditMysticCryptEntryDialog); } protected void onOpenUrlOfTableEntry() @@ -778,7 +776,6 @@ protected void onOpenUrlOfTableEntry() }); } - @SuppressWarnings("unchecked") protected void onAddTableEntry() { MysticCryptEntryTabbedPanel panel = new MysticCryptEntryTabbedPanel(); @@ -818,16 +815,14 @@ private void addNewTableEntryToModel(MysticCryptEntryModelBean modelObject) private BaseTreeNode>, Long> getSelectedBaseTreeNode() { DefaultMutableTreeNode selectedTreeNode = getSelectedTreeNode(); - BaseTreeNode>, Long> selectedBaseTreeNode; if (selectedTreeNode == null) { - selectedBaseTreeNode = getModelObject().getRoot(); + return getModelObject().getRoot(); } { Object userObject = selectedTreeNode.getUserObject(); - selectedBaseTreeNode = (BaseTreeNode>, Long>)userObject; + return (BaseTreeNode>, Long>)userObject; } - return selectedBaseTreeNode; } private void reloadApplicationTreeModel()