Skip to content

Commit

Permalink
IBM fix (#2198)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffery-Wasty authored Aug 17, 2023
1 parent d90015c commit 35985ad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/com/microsoft/sqlserver/jdbc/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ private Util() {
private static final Lock LOCK = new ReentrantLock();

static boolean isIBM() {
return SYSTEM_JRE.startsWith("IBM");
Class<?> clazz = null;
try {
clazz = Class.forName("com.ibm.lang.management.MemoryUsage");
} catch (ClassNotFoundException e) {
//We're using the try-catch to test for IBM jdk, no need to handle exception.
}
return null != clazz;
}

static String getJVMArchOnWindows() {
Expand Down

0 comments on commit 35985ad

Please sign in to comment.