Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumberFormatException with file names like V1..1__desc.sql #573

Merged
merged 3 commits into from Aug 20, 2013

Conversation

@blob79
Copy link

@blob79 blob79 commented Aug 2, 2013

Fixes #572

As part of the fix I also fixed the compareTo implementation for MigrationVersion.EMPTY and MigrationVersion.LATEST and simplified the code a bit.

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Aug 3, 2013

Hi Thomas,

thanks for your contribution! While I agreed with you that a NumberFormatException is not desirable here, I don't believe 1..1 should be allowed as a version. Could you rework the code so a FlywayException with a meaningful error message is thrown instead?

Cheers
Axel

@blob79
Copy link
Author

@blob79 blob79 commented Aug 5, 2013

Hi Axel,

I fixed the parsing now. In the process of looking at the code again I also fixed the hashCode method.

Thomas

@pwielgolaski
Copy link
Contributor

@pwielgolaski pwielgolaski commented Aug 10, 2013

I like this change, it simplifies implementation 👍

axelfontaine added a commit that referenced this pull request Aug 20, 2013
NumberFormatException with file names like V1..1__desc.sql
@axelfontaine axelfontaine merged commit 1695d0c into flyway:master Aug 20, 2013
1 check passed
1 check passed
default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.