5
5
import org .utplsql .cli .ConnectionConfig ;
6
6
import org .utplsql .cli .exception .DatabaseConnectionFailed ;
7
7
8
- import java .io .File ;
9
8
import java .sql .Connection ;
10
9
import java .sql .SQLException ;
11
10
import java .util .ArrayList ;
@@ -20,7 +19,6 @@ interface ConnectStringPossibility {
20
19
String getMaskedConnectString (ConnectionConfig config );
21
20
}
22
21
23
-
24
22
private final ConnectionConfig config ;
25
23
private List <ConnectStringPossibility > possibilities = new ArrayList <>();
26
24
@@ -35,13 +33,13 @@ public HikariDataSource getDataSource() throws SQLException {
35
33
36
34
HikariDataSource ds = new HikariDataSource ();
37
35
38
- setInitSql (ds );
39
- testAndSetJdbcUrl (ds );
36
+ setInitSqlFrom_NLS_LANG (ds );
37
+ setThickOrThinJdbcUrl (ds );
40
38
41
39
return ds ;
42
40
}
43
41
44
- private void testAndSetJdbcUrl ( HikariDataSource ds ) throws SQLException
42
+ private void setThickOrThinJdbcUrl ( HikariDataSource ds ) throws SQLException
45
43
{
46
44
List <String > errors = new ArrayList <>();
47
45
Throwable lastException = null ;
@@ -59,7 +57,7 @@ private void testAndSetJdbcUrl( HikariDataSource ds ) throws SQLException
59
57
throw new DatabaseConnectionFailed (lastException );
60
58
}
61
59
62
- private void setInitSql ( HikariDataSource ds ) {
60
+ private void setInitSqlFrom_NLS_LANG ( HikariDataSource ds ) {
63
61
String nls_lang = EnvironmentVariableUtil .getEnvValue ("NLS_LANG" );
64
62
65
63
if ( nls_lang != null ) {
0 commit comments