On Mon, 25 Aug 2014 16:47:04 +0200 Eric Chatellier <chatellier@codelutin.com> wrote:
Hi,
I just find out that Version class has been deprecated and replaced by another one.
How can I replace following code to extart sub version from an initial version :
Version version = ...; // this part doesn't matter
Version majorVersion = new Version(version.getNumber(0)); Version databaseVersion = new Version(version.getNumber(0), version.getNumber(1)); Version apiVersion = new Version(version.getNumber(0), version.getNumber(1), version.getNumber(2));
FYI, I will move all methods in the Version class to the Versions class which produces another Version object (increments, ...). I think it would be also the right place for you to write the method we talk about yesterday night: Version Versions.extractVersion(Version v, int component) Version Versions.extractVersion(Version v, int firstComponent, int last Component) Can you manage this please ? We could also add in the Version class a getNumberComponent (if not already exists? which invok getComponent and return his value), same with getTextComponent... Thanks, tony. -- Tony Chemit -------------------- tél: +33 (0) 2 40 50 29 28 http://www.codelutin.com email: chemit@codelutin.com twitter: https://twitter.com/tchemit