Skip to content

Commit b305079

Browse files
author
Myron Scott
committed
simplify versioning
1 parent 7b6e063 commit b305079

File tree

13 files changed

+14
-1081
lines changed

13 files changed

+14
-1081
lines changed

common/src/main/java/com/tc/util/version/DefaultVersionCompatibility.java

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,16 @@ public class DefaultVersionCompatibility implements VersionCompatibility {
2727

2828
@Override
2929
public boolean isCompatibleClientServer(String clientVersion, String serverVersion) {
30-
return isCompatibleClientServer(new Version(clientVersion), new Version(serverVersion));
30+
return true;
3131
}
3232

3333
@Override
3434
public boolean isCompatibleServerServer(String v1, String v2) {
35-
return isCompatibleServerServer(new Version(v1), new Version(v2));
35+
return true;
3636
}
3737

3838
@Override
3939
public boolean isCompatibleServerPersistence(String persisted, String current) {
40-
return isCompatibleServerServer(new Version(persisted), new Version(current));
41-
}
42-
43-
private boolean isCompatibleClientServer(Version clientVersion, Version serverVersion) {
44-
return isCompatible(clientVersion, serverVersion) && !clientVersion.isNewer(serverVersion, 3);
45-
}
46-
47-
private boolean isCompatibleServerServer(Version v1, Version v2) {
48-
return isCompatible(v1, v2);
49-
}
50-
51-
private boolean isCompatibleServerPersistence(Version persisted, Version current) {
52-
if (persisted.major() == current.major() && persisted.minor() == current.minor()) {
53-
return true;
54-
} else {
55-
return current.compareTo(persisted) >= 0;
56-
}
57-
}
58-
59-
private static boolean isCompatible(Version v1, Version v2) {
60-
if (v1 == null || v2 == null) { throw new NullPointerException(); }
61-
return ((v1.major() == v2.major()) && (v1.minor() == v2.minor()));
62-
}
63-
64-
public static boolean isNewer(Version v1, Version v2, int depth) {
65-
if (v1 == null || v2 == null) { throw new NullPointerException(); }
66-
return v1.isNewer(v2, depth);
40+
return true;
6741
}
6842
}

common/src/main/java/com/tc/util/version/Version.java

Lines changed: 0 additions & 222 deletions
This file was deleted.

common/src/main/java/com/tc/util/version/VersionMatcher.java

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)