Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
refactor: fix getDriverVersion and getDriverName and getJDBCMajor/MinorVersion methods #668
Current coverage is 64.37% (diff: 41.66%)
@@ master #668 diff @@ ========================================== Files 163 163 Lines 15142 15140 -2 Methods 0 0 Messages 0 0 Branches 2987 2987 ========================================== + Hits 9727 9747 +20 + Misses 4182 4156 -26 - Partials 1233 1237 +4
@vlsi, prior to maven conversion the version was returned in this format:
The output of postgresql-9.3-1103.jdbc3.jar is "PostgreSQL 9.3 JDBC3g (build 1103)"
I doubt anyone is using that to "parse" the version of the driver, for that there is getDriverMajorVersion() and getDriverMinorVersion() methods. It's a matter of correctness since getDriverVersion() means version.
IMO general applications use getDriverVersion() and getDriverName() for printing information not for implement logic.
I did a quick find (nothing deep) on "potential" projects that "probably" use this information which are mostly ORMs, on JOOQ, Sprint-JDBC, Hibernate and found.... nothing.
Since we have entered in a highly speculative area I will close this PR.
In general looks good, except two things:
- I would like to refrain from copy-pasting inherited javadocs. The build process handles that just fine (I mean it is smart enough to copy javadocs from
- string split in
6 times, most recently
Dec 30, 2016
@vlsi, requested changes done, removed javadoc that can be inherited, I could not reproduce the behavior using
For the second point, the other form to split the version is with a StringTokenizer, but the JavaDocs say:
Happy New Year!