Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Improve naming
  • Loading branch information
pesse committed Oct 11, 2018
commit 6bb8b9e6cce3cd21fb717ab5914199b2d350b201
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.utplsql.cli.ConnectionConfig;
import org.utplsql.cli.exception.DatabaseConnectionFailed;

import java.io.File;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
Expand All @@ -20,7 +19,6 @@ interface ConnectStringPossibility {
String getMaskedConnectString(ConnectionConfig config);
}


private final ConnectionConfig config;
private List<ConnectStringPossibility> possibilities = new ArrayList<>();

Expand All @@ -35,13 +33,13 @@ public HikariDataSource getDataSource() throws SQLException {

HikariDataSource ds = new HikariDataSource();

setInitSql(ds);
testAndSetJdbcUrl(ds);
setInitSqlFrom_NLS_LANG(ds);
setThickOrThinJdbcUrl(ds);

return ds;
}

private void testAndSetJdbcUrl( HikariDataSource ds ) throws SQLException
private void setThickOrThinJdbcUrl(HikariDataSource ds ) throws SQLException
{
List<String> errors = new ArrayList<>();
Throwable lastException = null;
Expand All @@ -59,7 +57,7 @@ private void testAndSetJdbcUrl( HikariDataSource ds ) throws SQLException
throw new DatabaseConnectionFailed(lastException);
}

private void setInitSql( HikariDataSource ds ) {
private void setInitSqlFrom_NLS_LANG(HikariDataSource ds ) {
String nls_lang = EnvironmentVariableUtil.getEnvValue("NLS_LANG");

if ( nls_lang != null ) {
Expand Down