Skip to content

Commit 77fd752

Browse files
committed
Refactor: Include only left check-functionality
1 parent 1b65b51 commit 77fd752

File tree

2 files changed

+13
-32
lines changed

2 files changed

+13
-32
lines changed

src/main/java/org/utplsql/cli/RunAction.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,8 @@ private void outputMainInformation() {
189189
private void initDatabase(DataSource dataSource) throws SQLException {
190190
try (Connection conn = dataSource.getConnection()) {
191191

192-
// Check if orai18n exists if database version is 11g
193-
RunCommandChecker.checkOracleI18nExists(conn);
192+
checkOracleI18nExists(conn);
194193

195-
// First of all do a compatibility check and fail-fast
196194
compatibilityProxy = checkFrameworkCompatibility(conn);
197195

198196
logger.info("Successfully connected to database. UtPLSQL core: {}", compatibilityProxy.getVersionDescription());
@@ -207,6 +205,18 @@ private void initDatabase(DataSource dataSource) throws SQLException {
207205
}
208206
}
209207

208+
/** Checks that orai18n library exists and show a warning if not
209+
*/
210+
private void checkOracleI18nExists(Connection con) throws SQLException {
211+
212+
if ( !OracleLibraryChecker.checkOrai18nExists() ) {
213+
System.out.println("WARNING: Could not find Oracle i18n driver in classpath. Depending on the database charset " +
214+
"utPLSQL-cli, especially code coverage, might not run properly. It is recommended you download " +
215+
"the i18n driver from the Oracle website and copy it to the 'lib' folder of your utPLSQL-cli installation.");
216+
System.out.println("Download from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html");
217+
}
218+
}
219+
210220
private List<Reporter> initReporters(DataSource dataSource) throws SQLException {
211221
try (Connection conn = dataSource.getConnection()) {
212222
reporterFactory = ReporterFactoryProvider.createReporterFactory(compatibilityProxy);

src/main/java/org/utplsql/cli/RunCommandChecker.java

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)