@Test public void test() { final PomVersion server = PomVersion.parse("1.3.9"); assertEquals(Status.EQUAL, VersionCompatibility.getStatus(server, server)); assertEquals(Status.COMPATIBLE, VersionCompatibility.getStatus( server, PomVersion.parse("1.3.10"))); assertEquals(Status.COMPATIBLE, VersionCompatibility.getStatus( server, PomVersion.parse("1.2.8"))); assertEquals(Status.MAYBE, VersionCompatibility.getStatus( server, PomVersion.parse("1.4.8"))); assertEquals(Status.INCOMPATIBLE, VersionCompatibility.getStatus( server, PomVersion.parse("9.0.0"))); }
public static Status getStatus(final PomVersion serverVersion, final PomVersion clientVersion) { if (serverVersion.equals(clientVersion)) { return Status.EQUAL; } if (serverVersion.getMajor() != clientVersion.getMajor()) { return Status.INCOMPATIBLE; } if (serverVersion.getMinor() >= clientVersion.getMinor()) { return Status.COMPATIBLE; } return Status.MAYBE; }
VersionCompatibility { public static Status getStatus(final PomVersion serverVersion, final PomVersion clientVersion) { if (serverVersion.equals(clientVersion)) { return Status.EQUAL; } if (serverVersion.getMajor() != clientVersion.getMajor()) { return Status.INCOMPATIBLE; } if (serverVersion.getMinor() >= clientVersion.getMinor()) { return Status.COMPATIBLE; } return Status.MAYBE; } }
VersionCompatibility { public static Status getStatus(final PomVersion serverVersion, final PomVersion clientVersion) { if (serverVersion.equals(clientVersion)) { return Status.EQUAL; } if (serverVersion.getMajor() != clientVersion.getMajor()) { return Status.INCOMPATIBLE; } if (serverVersion.getMinor() >= clientVersion.getMinor()) { return Status.COMPATIBLE; } return Status.MAYBE; }  }
VersionCompatibility { public static Status getStatus(final PomVersion serverVersion, final PomVersion clientVersion) { if (serverVersion.equals(clientVersion)) { return Status.EQUAL; } if (serverVersion.getMajor() != clientVersion.getMajor()) { return Status.INCOMPATIBLE; } if (serverVersion.getMinor() >= clientVersion.getMinor()) { return Status.COMPATIBLE; } return Status.MAYBE; }  static Status getStatus(final PomVersion serverVersion, final PomVersion clientVersion); }
VersionCompatibility { public static Status getStatus(final PomVersion serverVersion, final PomVersion clientVersion) { if (serverVersion.equals(clientVersion)) { return Status.EQUAL; } if (serverVersion.getMajor() != clientVersion.getMajor()) { return Status.INCOMPATIBLE; } if (serverVersion.getMinor() >= clientVersion.getMinor()) { return Status.COMPATIBLE; } return Status.MAYBE; }  static Status getStatus(final PomVersion serverVersion, final PomVersion clientVersion); static final String HELIOS_VERSION_HEADER; static final String HELIOS_SERVER_VERSION_HEADER; static final String HELIOS_VERSION_STATUS_HEADER; }