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)); ? Thanks. -- Éric Chatellier - www.codelutin.com - 02.40.50.29.28
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));
?
Thanks.
Use org.nuiton.util.version.VersionBuilder, or sometimes shortcut methods offered by org.nuiton.util.version.Versions 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
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
Le 26/08/2014 09:43, Tony Chemit a écrit :
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 ?
No, because I think that you will do this better than me. I've only done following issues: * http://nuiton.org/issues/3476 * http://nuiton.org/issues/3477 This features can wait. -- Éric Chatellier - www.codelutin.com - 02.40.50.29.28
After internal private talks, i changed my minds. Le 26/08/2014 10:14, Eric Chatellier a écrit :
I've only done following issues: * http://nuiton.org/issues/3476
I've no personnal vision about move or not move this method out of Version class. So i pass on this one.
* http://nuiton.org/issues/3477 I will do this one.
-- Éric Chatellier - www.codelutin.com - 02.40.50.29.28
Le 26/08/2014 11:04, Eric Chatellier a écrit :
* http://nuiton.org/issues/3477 I will do this one. Done : http://nuiton.org/projects/nuiton-utils/repository/revisions/2679
-- Éric Chatellier - www.codelutin.com - 02.40.50.29.28
participants (2)
-
Eric Chatellier -
Tony Chemit