Skip to content

Commit 3de7a0a

Browse files
committed
Updated connect property to add appname
1 parent f9c8737 commit 3de7a0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1294,9 +1294,9 @@ public java.sql.Connection connect(String url, Properties suppliedProperties) th
12941294
Properties connectProperties = parseAndMergeProperties(url, suppliedProperties);
12951295
if (connectProperties != null) {
12961296
result = DriverJDBCVersion.getSQLServerConnection(toString());
1297-
if (suppliedProperties != null && suppliedProperties.getProperty(SQLServerDriverStringProperty.APPLICATION_NAME.toString()) == null) {
1297+
if (suppliedProperties == null || (suppliedProperties != null && suppliedProperties.getProperty(SQLServerDriverStringProperty.APPLICATION_NAME.toString()) == null)) {
12981298
connectProperties.setProperty(SQLServerDriverStringProperty.APPLICATION_NAME.toString(), SQLServerDriver.constructedAppName);
1299-
}
1299+
}
13001300
result.connect(connectProperties, null);
13011301
}
13021302
loggerExternal.exiting(getClassNameLogging(), "connect", result);

0 commit comments

Comments
 (0)