diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java
index 58f30b56..b3ef0a18 100755
--- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java
+++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java
@@ -31,6 +31,7 @@ import com.wisemapping.xml.freemind.Node;
import com.wisemapping.xml.mindmap.RelationshipType;
import com.wisemapping.xml.mindmap.TopicType;
import com.wisemapping.xml.mindmap.Link;
+import org.jetbrains.annotations.NotNull;
import org.w3c.dom.*;
import javax.xml.bind.JAXBException;
@@ -421,23 +422,23 @@ public class FreemindImporter
boolean hasBold = Boolean.parseBoolean(font.getBOLD());
- fontStyle.append(hasBold ? BOLD : null);
+ fontStyle.append(hasBold ? BOLD : "");
fontStyle.append(";");
boolean hasItalic = Boolean.parseBoolean(font.getITALIC());
- fontStyle.append(hasItalic ? ITALIC : null);
+ fontStyle.append(hasItalic ? ITALIC : "");
fontStyle.append(";");
}
return fontStyle.toString();
}
- private String fixFontName(Font font) {
- String fontName = com.wisemapping.model.Font.ARIAL.getFontName(); // Default Font
+ private @NotNull String fixFontName(@NotNull Font font) {
+ String result = com.wisemapping.model.Font.ARIAL.getFontName(); // Default Font
if (com.wisemapping.model.Font.isValidFont(font.getNAME())) {
- fontName = font.getNAME();
+ result = font.getNAME();
}
- return fontName;
+ return result;
}
private String getShapeFormFromNode(Node node) {
diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Font.java b/wise-webapp/src/main/java/com/wisemapping/model/Font.java
index d5268555..9e14ace8 100755
--- a/wise-webapp/src/main/java/com/wisemapping/model/Font.java
+++ b/wise-webapp/src/main/java/com/wisemapping/model/Font.java
@@ -18,6 +18,8 @@
package com.wisemapping.model;
+import org.jetbrains.annotations.NotNull;
+
public enum Font {
VERDANA("Verdana"),
@@ -37,7 +39,7 @@ public enum Font {
return fontName;
}
- public static boolean isValidFont(String font) {
+ public static boolean isValidFont(@NotNull String font) {
boolean isValid = false;
try {
if (font != null) {
@@ -45,6 +47,7 @@ public enum Font {
}
}
catch (IllegalArgumentException ignote) {
+ // Ignore ...
}
return isValid;
diff --git a/wise-webapp/src/test/data/freemind/fonts.mm b/wise-webapp/src/test/data/freemind/fonts.mm
new file mode 100644
index 00000000..25e29b73
--- /dev/null
+++ b/wise-webapp/src/test/data/freemind/fonts.mm
@@ -0,0 +1,40 @@
+
diff --git a/wise-webapp/src/test/data/freemind/fonts.mmr b/wise-webapp/src/test/data/freemind/fonts.mmr
new file mode 100644
index 00000000..63458dfb
--- /dev/null
+++ b/wise-webapp/src/test/data/freemind/fonts.mmr
@@ -0,0 +1 @@
+
\ No newline at end of file