Skip to content

Commit

Permalink
Review Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRahulSharma committed Jan 2, 2024
1 parent 3a53fc9 commit 79e58f2
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.cdap.plugin.oracle;

import javax.annotation.Nullable;

/**
* Oracle Constants.
*/
Expand Down Expand Up @@ -47,17 +49,17 @@ private OracleConstants() {
* @return Connection String based on the given ConnectionType
*/
public static String getConnectionString(String connectionType,
String host,
int port,
@Nullable String host,
@Nullable int port,
String database) {
if (OracleConstants.TNS_CONNECTION_TYPE.equalsIgnoreCase(connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_TNS_FORMAT, database);
} else if (OracleConstants.SERVICE_CONNECTION_TYPE.equalsIgnoreCase(connectionType)) {
}
if (OracleConstants.SERVICE_CONNECTION_TYPE.equalsIgnoreCase(connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT,
host, port, database);
} else {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT,
host, port, database);
}
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT,
host, port, database);
}
}

0 comments on commit 79e58f2

Please sign in to comment.