File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/test/java/com/microsoft/sqlserver/jdbc/unit/statement Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -161,9 +161,15 @@ public void testSqlServerBulkCopyCachingConnectionLevel() throws Exception {
161
161
stmt .execute (createSqlTable1 );
162
162
stmt .execute (createSqlTable2 );
163
163
164
- Field bulkcopyMetadataCacheField = TestUtils .getJVMVersion () > 8 ?
165
- con .getClass ().getSuperclass ().getDeclaredField ("BULK_COPY_OPERATION_CACHE" ) :
166
- con .getClass ().getDeclaredField ("BULK_COPY_OPERATION_CACHE" );
164
+ Field bulkcopyMetadataCacheField ;
165
+
166
+ if (con .getClass ().getName ().equals ("com.microsoft.sqlserver.jdbc.SQLServerConnection43" )) {
167
+ bulkcopyMetadataCacheField = con .getClass ().getSuperclass ()
168
+ .getDeclaredField ("BULK_COPY_OPERATION_CACHE" );
169
+ } else {
170
+ bulkcopyMetadataCacheField = con .getClass ().getDeclaredField ("BULK_COPY_OPERATION_CACHE" );
171
+ }
172
+
167
173
bulkcopyMetadataCacheField .setAccessible (true );
168
174
Object bulkcopyCache = bulkcopyMetadataCacheField .get (con );
169
175
You can’t perform that action at this time.
0 commit comments