mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-24 15:07:56 +01:00
removing comparasion hack and fixing order to compare versions
This commit is contained in:
parent
c282a80b5d
commit
e1a28027db
@ -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.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user