From 0577d64522e6c7d28faf7304552d19998e5fd9b1 Mon Sep 17 00:00:00 2001 From: Nilstrieb Date: Fri, 20 Nov 2020 18:17:35 +0100 Subject: [PATCH] fixed contructor double space bug --- .idea/misc.xml | 2 +- src/UMLMethod.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 2a824a2..e69afb6 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/UMLMethod.java b/src/UMLMethod.java index 5b28f33..95b80d2 100644 --- a/src/UMLMethod.java +++ b/src/UMLMethod.java @@ -34,9 +34,9 @@ public class UMLMethod { if(parts[1].equals("") && !className.equals(name)){ - this.returnType = "void"; + this.returnType = "void "; } else { - this.returnType = parts[1]; + this.returnType = parts[1] + " "; } if(parts.length == 4) { @@ -57,7 +57,7 @@ public class UMLMethod { @Override public String toString() { StringBuilder returnString = new StringBuilder(); - returnString.append("\n ").append(encapsulation).append(returnType).append(" ").append(name).append(" ("); + returnString.append("\n ").append(encapsulation).append(returnType).append(name).append(" ("); for (int i = 0; i < argsNames.size(); i++) { returnString.append(argsTypes.get(i)).append(" ").append(argsNames.get(i));