You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/09/23 17:17:40 UTC

[isis] branch master updated: ISIS-2437: fixing lombok issue (2)

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 122c8cd  ISIS-2437: fixing lombok issue (2)
122c8cd is described below

commit 122c8cdb11bfae73dc734b1e96ca757b7e3fb137
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Sep 23 19:17:27 2020 +0200

    ISIS-2437: fixing lombok issue (2)
---
 .../isis/tooling/cli/projdoc/ProjectDocModel.java  | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java b/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java
index ec735f0..9987c88 100644
--- a/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java
+++ b/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java
@@ -32,6 +32,7 @@ import javax.annotation.Nullable;
 
 import com.structurizr.model.Container;
 
+import org.apache.commons.lang3.builder.EqualsExclude;
 import org.asciidoctor.ast.Document;
 
 import org.apache.isis.commons.collections.Can;
@@ -54,6 +55,7 @@ import static org.apache.isis.tooling.model4adoc.AsciiDocFactory.headRow;
 import static org.apache.isis.tooling.model4adoc.AsciiDocFactory.row;
 import static org.apache.isis.tooling.model4adoc.AsciiDocFactory.table;
 
+import lombok.EqualsAndHashCode;
 import lombok.NonNull;
 import lombok.RequiredArgsConstructor;
 import lombok.val;
@@ -107,9 +109,10 @@ public class ProjectDocModel {
     // -- HELPER
 
     @RequiredArgsConstructor(staticName = "of")
+    @EqualsAndHashCode
     private static class ProjectAndContainerTuple {
         final ProjectNode projectNode;
-        final Container container;
+        @EqualsExclude final Container container;
     }
     
     private static class GroupDiagram {
@@ -125,20 +128,21 @@ public class ProjectDocModel {
             projectNodes.add(module);
         }
 
+        //XXX lombok issues, not using val here
         public String toPlantUml() {
             val key = c4.getWorkspaceName();
             val softwareSystem = c4.softwareSystem("package-ecosystem", null);
 
-            val tuples = Can.ofCollection(projectNodes)
-                    .map(projectNode->{
-                        val name = projectNode.getName();
-                        val description = ""; //projectNode.getDescription() XXX needs sanitizing, potentially breaks plantuml/asciidoc syntax
-                        val technology = String.format("packaging: %s", projectNode.getArtifactCoordinates().getPackaging());
-                        val container = softwareSystem.addContainer(name, description, technology);
-                        return ProjectAndContainerTuple.of(projectNode, container);
-                    });
+            final Can<ProjectAndContainerTuple> tuples = Can.<ProjectNode>ofCollection(projectNodes)
+            .map(projectNode->{
+                val name = projectNode.getName();
+                val description = ""; //projectNode.getDescription() XXX needs sanitizing, potentially breaks plantuml/asciidoc syntax
+                val technology = String.format("packaging: %s", projectNode.getArtifactCoordinates().getPackaging());
+                val container = softwareSystem.addContainer(name, description, technology);
+                return ProjectAndContainerTuple.of(projectNode, container);
+            });
 
-            //XXX lombok issue, not using val here
+            
             final _AdjacencyMatrix<ProjectAndContainerTuple> adjMatrix = 
                     _AdjacencyMatrix.of(tuples, (a, b)->a.projectNode.getChildren().contains(b.projectNode));