mirror of https://github.com/apache/openjpa.git
Changed the parsing of the driver name to not use the JDK 1.5-specific method String.contains() and String.split().
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@549508 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a39a2dace9
commit
cc8ac0bc64
|
@ -79,9 +79,16 @@ public class SQLServerDictionary
|
|||
driverVendor = VENDOR_OTHER;
|
||||
} else
|
||||
driverVendor = VENDOR_OTHER;
|
||||
if (driverName.contains(platform) && Integer.parseInt(driverName
|
||||
.split("Server ",0)[1].split(" ")[0]) >= 2005)
|
||||
supportsXMLColumn = true;
|
||||
if (driverName.indexOf(platform) != -1) {
|
||||
String versionString = driverName.
|
||||
substring(platform.length() + 1);
|
||||
if (versionString.indexOf(" ") != -1)
|
||||
versionString = versionString.substring(0,
|
||||
versionString.indexOf(" "));
|
||||
int version = Integer.parseInt(versionString);
|
||||
if (version >= 2005)
|
||||
supportsXMLColumn = true;
|
||||
}
|
||||
}
|
||||
|
||||
// warn about using cursors
|
||||
|
|
Loading…
Reference in New Issue