cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 3 May 2023 22:06:27 +0000 (00:06 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 3 May 2023 22:06:27 +0000 (00:06 +0200)
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/portal/DistributionTreeDtoLoader.java

index 0ae68874e2595c4fc6c354c3d010b3919b9d5063..7c4ca7384c4ca80caf4c2668956e61b3043d7ad9 100644 (file)
@@ -63,7 +63,7 @@ public class DistributionTreeDtoLoader {
      * Returns the (first) child node (of type TreeNode) with the given nodeID.
      * @return the found node or null
      */
-    public TreeNode<Set<DistributionDto>, NamedAreaDto> findChildNode(TreeNode<Set<DistributionDto>, NamedAreaDto> parentNode, NamedAreaDto  nodeID) {
+    public TreeNode<Set<DistributionDto>, NamedAreaDto> findChildNode(TreeNode<Set<DistributionDto>,NamedAreaDto> parentNode, NamedAreaDto  nodeID) {
         if (parentNode.getChildren() == null) {
             return null;
         }
@@ -188,8 +188,8 @@ public class DistributionTreeDtoLoader {
       TreeNode<Set<DistributionDto>, NamedAreaDto> child = findChildNode(root, highestArea);
       if (child == null) {
           // the highestDistNode is not yet in the set of children, so we add it
-          child = new TreeNode<Set<DistributionDto>, NamedAreaDto>(highestArea);
-          child.setData(new HashSet<DistributionDto>());
+          child = new TreeNode<Set<DistributionDto>,NamedAreaDto>(highestArea);
+          child.setData(new HashSet<>());
           root.addChild(child);
       }