From 0e61381122aa321e02ac56d8265d19dde7e83a64 Mon Sep 17 00:00:00 2001 From: Henning Gerhardt Date: Fri, 31 Jan 2020 14:25:40 +0100 Subject: [PATCH] Fix checkstyle --- .../forms/dataeditor/StructurePanel.java | 24 +++++++++---------- .../process/NewspaperProcessesGenerator.java | 3 ++- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/StructurePanel.java b/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/StructurePanel.java index 98512db0622..fcffde82af8 100644 --- a/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/StructurePanel.java +++ b/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/StructurePanel.java @@ -391,18 +391,6 @@ public void show(boolean keepSelection) { } } - private void restoreSelection(String rowKey, TreeNode parentNode) { - for (TreeNode childNode : parentNode.getChildren()) { - if (Objects.nonNull(childNode) && rowKey.equals(childNode.getRowKey())) { - childNode.setSelected(true); - break; - } else { - childNode.setSelected(false); - restoreSelection(rowKey, childNode); - } - } - } - /** * Loads the tree(s) into the panel and sets the selected element to the * root element of the structure tree. @@ -425,6 +413,18 @@ public void show() { this.previouslySelectedPhysicalNode = selectedPhysicalNode; } + private void restoreSelection(String rowKey, TreeNode parentNode) { + for (TreeNode childNode : parentNode.getChildren()) { + if (Objects.nonNull(childNode) && rowKey.equals(childNode.getRowKey())) { + childNode.setSelected(true); + break; + } else { + childNode.setSelected(false); + restoreSelection(rowKey, childNode); + } + } + } + /** * Creates the structure tree. If hierarchical links exist upwards, they are * displayed above the tree as separate trees. diff --git a/Kitodo/src/main/java/org/kitodo/production/process/NewspaperProcessesGenerator.java b/Kitodo/src/main/java/org/kitodo/production/process/NewspaperProcessesGenerator.java index 3802600e206..5b59b5bf559 100644 --- a/Kitodo/src/main/java/org/kitodo/production/process/NewspaperProcessesGenerator.java +++ b/Kitodo/src/main/java/org/kitodo/production/process/NewspaperProcessesGenerator.java @@ -362,7 +362,8 @@ public static StructuralElementViewInterface nextSubView(RulesetManagementInterf * @return the initialized title generator */ private static TitleGenerator initializeTitleGenerator(ConfigProject configProject, Workpiece workpiece, - Collection addableDivisions) throws DoctypeMissingException { + Collection addableDivisions) + throws DoctypeMissingException { IncludedStructuralElement rootElement = workpiece.getRootElement(); Map> metadata = new HashMap<>(4);