You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by Samuel Solon <ss...@usa.net> on 2005/09/08 17:57:34 UTC
Bug in PlatformUtils.java
It appears that determineDatabaseType method in PlatformUtils.java incorrectly
adds a leading ":" to the subProtocol variable causing matches (for Sybase in
particular) to fail.
Index: D:/workspace/ddlutils/src/java/org/apache/ddlutils/PlatformUtils.java
===================================================================
--- D:/workspace/ddlutils/src/java/org/apache/ddlutils/PlatformUtils.java
(revision 279001)
+++ D:/workspace/ddlutils/src/java/org/apache/ddlutils/PlatformUtils.java
(working copy)
@@ -241,7 +241,7 @@
"sybase".equals(subProtocol))
{
pos = jdbcConnectionUrl.indexOf(':', pos + 1);
- subProtocol = ":" + jdbcConnectionUrl.substring(lastPos + 1,
pos);
+ subProtocol = jdbcConnectionUrl.substring(lastPos + 1, pos);
}
return (String)jdbcSubProtocolToPlatform.get(subProtocol);
Re: Bug in PlatformUtils.java
Posted by Thomas Dudziak <to...@gmail.com>.
On 9/8/05, Samuel Solon <ss...@usa.net> wrote:
> It appears that determineDatabaseType method in PlatformUtils.java incorrectly
> adds a leading ":" to the subProtocol variable causing matches (for Sybase in
> particular) to fail.
I used this opportunity and reworked (simplified) the algorithm, and
added unit tests for the drivers and connection urls. Please test :-)
Tom