mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-24 20:23:50 +01:00
removing comparasion hack and fixing order to compare versions
This commit is contained in:
parent
8318e897fe
commit
7b512ea2f6
@ -69,7 +69,7 @@ public class FreemindImporter
|
|||||||
private static final String EMPTY_FONT_STYLE = ";;;;;";
|
private static final String EMPTY_FONT_STYLE = ";;;;;";
|
||||||
private final static Charset UTF_8_CHARSET = Charset.forName("UTF-8");
|
private final static Charset UTF_8_CHARSET = Charset.forName("UTF-8");
|
||||||
private final static int ORDER_SEPARATION_FACTOR = 2;
|
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;
|
private int currentId;
|
||||||
@ -120,13 +120,8 @@ public class FreemindImporter
|
|||||||
final String version = freemindMap.getVersion();
|
final String version = freemindMap.getVersion();
|
||||||
if (version != null) {
|
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);
|
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.");
|
throw new ImporterException("FreeMind version " + mapVersion.getVersion() + " is not supported.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user