From 7b512ea2f63f1a3e66d48b4047eba2bce64fdd3b Mon Sep 17 00:00:00 2001 From: Claudio Barril Date: Wed, 20 Aug 2014 23:30:24 -0300 Subject: [PATCH] removing comparasion hack and fixing order to compare versions --- .../wisemapping/importer/freemind/FreemindImporter.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 15bed398..bf35454b 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 @@ -69,7 +69,7 @@ public class FreemindImporter private static final String EMPTY_FONT_STYLE = ";;;;;"; private final static Charset UTF_8_CHARSET = Charset.forName("UTF-8"); private final static int ORDER_SEPARATION_FACTOR = 2; - private static final VersionNumber SUPPORTED_FREEMIND_VERSION = new VersionNumber("0.9.0"); + private static final VersionNumber SUPPORTED_FREEMIND_VERSION = new VersionNumber("1.0.1"); private int currentId; @@ -120,13 +120,8 @@ public class FreemindImporter final String version = freemindMap.getVersion(); if (version != null) { - // Is freemind mindmap ? - if (version.charAt(0) != '0') { - throw new ImporterException("Mindmap is not a FreeMind document. Document type info " + version); - } - final VersionNumber mapVersion = new VersionNumber(version); - if (SUPPORTED_FREEMIND_VERSION.isGreaterThan(mapVersion)) { + if (mapVersion.isGreaterThan(SUPPORTED_FREEMIND_VERSION)) { throw new ImporterException("FreeMind version " + mapVersion.getVersion() + " is not supported."); } }