javiersantos / AppUpdater

A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required.
Apache License 2.0
1.98k stars 412 forks source link

render version string countability more imperturbable #136

Closed dhebbeker closed 6 years ago

dhebbeker commented 6 years ago

Preamble

A version string shall be composed of version partitions which are concatenated by dots. A version partition can be for example the major version number.

Current situation

Non-number characters are removed in version number partitions.

Change

Empty version number partitions are replaced with 0. In case the resulting version string is invalid a checked exception is thrown. This exception is catched in UtilsLibrary.java.

Effect

A version string is transformed from 2.1.3.alpha.42.RC to 2.1.3..42. to 2.1.3.0.42.0. Without this change an integer conversion error occurs when attempting to convert the empty version partitions.

javiersantos commented 6 years ago

Thank you 🥇