Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
****************************************************************
* Instruction for Building JDBC Driver:
* For building particular version of the driver, use commands:
* jre16 - - PS> gradle build
PS> gradle build -PbuildProfile=jre16
* jre11 - - PS> gradle build -PbuildProfile=jre11
* jre8 - - PS> gradle build -PbuildProfile=jre8
* jreXX - - PS> gradle build -PbuildProfile=jreXX
*
* For Excluding Groups in command line:
* PS> gradle build -PbuildProfile=jre11 "-PexcludedGroups=['xSQLv15','xGradle']"
Expand Down Expand Up @@ -35,17 +32,17 @@ test {
}
}

if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre16")){
if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre17")){

jreVersion = "jre16"
jreVersion = "jre17"
excludedFile = 'com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java'
jar {
manifest {
attributes 'Automatic-Module-Name': 'com.microsoft.sqlserver.jdbc'
}
}
sourceCompatibility = 16
targetCompatibility = 16
sourceCompatibility = 17
targetCompatibility = 17
}

if (hasProperty('buildProfile') && buildProfile == "jre11"){
Expand Down
13 changes: 6 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@
</build>
</profile>
<profile>
<id>jre16</id>
<id>jre17</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<finalName>${project.artifactId}-${project.version}.jre16${releaseExt}</finalName>
<finalName>${project.artifactId}-${project.version}.jre17${releaseExt}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -344,8 +344,8 @@
<excludes>
<exclude>**/com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java</exclude>
</excludes>
<source>16</source>
<target>16</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -429,8 +429,7 @@
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>${argLine} --illegal-access=permit -Xmx1024m
-XX:MaxPermSize=256m -Djava.library.path=${dllPath}
<argLine>${argLine} -Xmx1024m -Djava.library.path=${dllPath}
</argLine>
<excludedGroups>${excludedGroups}</excludedGroups>
</configuration>
Expand Down Expand Up @@ -506,7 +505,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.7</version>
<executions>
<execution>
<id>pre-test</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ public Object createdata() {
// for float in SQL Server, any precision <=24 is considered as real so the value must be within
// SqlTypeValue.REAL.minValue/maxValue
if (precision > 24) {
minvalue = ((Double) minvalue < Double.MIN_VALUE) ? Double.MIN_VALUE : minvalue;
maxvalue = ((Double) maxvalue > Double.MAX_VALUE) ? Double.MAX_VALUE : maxvalue;
return ThreadLocalRandom.current().nextDouble(((Double) minvalue), ((Double) maxvalue));
} else {

return ThreadLocalRandom.current().nextDouble((Float) SqlTypeValue.REAL.minValue,
(Float) SqlTypeValue.REAL.maxValue);
}
Expand Down