File tree Expand file tree Collapse file tree 4 files changed +1
-31
lines changed
main/java/org/utplsql/cli
test/java/org/utplsql/cli Expand file tree Collapse file tree 4 files changed +1
-31
lines changed Original file line number Diff line number Diff line change 39
39
</exclusion >
40
40
</exclusions >
41
41
</dependency >
42
- <dependency >
43
- <groupId >com.beust</groupId >
44
- <artifactId >jcommander</artifactId >
45
- <version >1.72</version >
46
- <scope >compile</scope >
47
- </dependency >
48
42
<dependency >
49
43
<groupId >com.zaxxer</groupId >
50
44
<artifactId >HikariCP</artifactId >
Original file line number Diff line number Diff line change 1
1
package org .utplsql .cli ;
2
2
3
- import com .beust .jcommander .IStringConverter ;
4
-
5
3
public class ConnectionInfo {
6
4
7
5
public static final String COMMANDLINE_PARAM_DESCRIPTION = "<user>/<password>@//<host>[:<port>]/<service> OR <user>/<password>@<TNSName> OR <user>/<password>@<host>:<port>:<SID>" ;
8
- private final String connectionInfo ;
9
-
10
- public ConnectionInfo (String connectionInfo ) {
11
- this .connectionInfo = connectionInfo ;
12
- }
13
-
14
- public String getConnectionString () {
15
- return connectionInfo ;
16
- }
17
-
18
- public static class ConnectionStringConverter implements IStringConverter <ConnectionInfo > {
19
-
20
- @ Override
21
- public ConnectionInfo convert (String s ) {
22
- return new ConnectionInfo (s );
23
- }
24
- }
25
6
}
Original file line number Diff line number Diff line change 1
1
package org .utplsql .cli ;
2
2
3
- import com .zaxxer .hikari .HikariDataSource ;
4
3
import org .utplsql .cli .datasource .TestedDataSourceProvider ;
5
4
6
5
import javax .sql .DataSource ;
@@ -21,10 +20,6 @@ public class DataSourceProvider {
21
20
}
22
21
}
23
22
24
- public static DataSource getDataSource (ConnectionInfo info , int maxConnections ) throws SQLException {
25
- return getDataSource (info .getConnectionString (), maxConnections );
26
- }
27
-
28
23
public static DataSource getDataSource (String connectString , int maxConnections ) throws SQLException {
29
24
30
25
requireOjdbc ();
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ static int runApp(String... args) {
62
62
}
63
63
64
64
static Version getFrameworkVersion () throws SQLException {
65
- DataSource ds = DataSourceProvider .getDataSource (new ConnectionInfo ( TestHelper .getConnectionString () ), 1 );
65
+ DataSource ds = DataSourceProvider .getDataSource (TestHelper .getConnectionString (), 1 );
66
66
try (Connection con = ds .getConnection () ) {
67
67
return DBHelper .getDatabaseFrameworkVersion (con );
68
68
}
You can’t perform that action at this time.
0 commit comments