0

I've modified a Java library changing some methods return type from his primitive to his equivalent class (for example from int to Integer, from float to Float). There are no other changes in the library.

In normal use the change should not alter the library behaviour because Java automatically unbox the values. Otherwise if the returned value is null an exception will be thrown by the JVM (currently the library throws an exception for an error during a parsing phase).

Given that the current version is 1.0.1, should I release the new library as 1.1.0 or 2.0.0?

Fedy2
  • 2,959
  • 2
  • 22
  • 41
  • Is there any kind of processes or guidelines in place for versioning? For us, a change like that would go to 1.0.2. The last thing you would want to do is start jumping the version around breaking any existing consistency. – Tim Oct 18 '13 at 21:17
  • No, there is no process or guideline, it is a library where I work in spare time. I'm agree with your comment, I want avoid to increase the version number too much with no reason. – Fedy2 Oct 18 '13 at 21:20
  • Well based on your two choices then, I would go 1.1.0 as the change seems pretty minor. Found this, might be useful...[http://stackoverflow.com/questions/2864448/best-practice-software-versioning](http://stackoverflow.com/questions/2864448/best-practice-software-versioning) – Tim Oct 18 '13 at 21:26

1 Answers1

1

From the book Practical API Design - Confessions of a Java Framework Architect.

If a method claims to return a non-null value in one version, then changing it to return null is in fact an incompatible change, because this change can be observed from the outside and negatively influences the component's users.

In another way in the book Enterprise Software Architecture and Design Entities, Services, and Resources:

Typically, version identifiers include major and minor version numbers, with the expectation that minor version updates are backward compatible with earlier versions with the same major version number.

And in the Software versioning - Wikipedia, the free encyclopedia:

In principle, in subsequent releases, the major number is increased when there are significant jumps in functionality, the minor number is incremented when only minor features or significant fixes have been added, and the revision number is incremented when minor bugs are fixed.

enter image description here

Paul Vargas
  • 38,878
  • 15
  • 91
  • 139