Skip to content

Commit

Permalink
Tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
pesse committed Oct 22, 2018
1 parent 6d12174 commit 9b0452c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/utplsql/api/FileMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private void setObjectType(String objectType) {
}

@Override
public String getSQLTypeName() throws SQLException {
public String getSQLTypeName() {
return CustomTypes.UT_FILE_MAPPING;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/utplsql/api/KeyValuePair.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public String getValue() {
}

@Override
public String getSQLTypeName() throws SQLException {
public String getSQLTypeName() {
return CustomTypes.UT_KEY_VALUE_PAIR;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/utplsql/api/TestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private void delayedAddReporters() {
throw new IllegalStateException("ReporterFactory must be set to add delayed Reporters!");
}

public void run(Connection conn) throws SomeTestsFailedException, SQLException, DatabaseNotCompatibleException, UtPLSQLNotInstalledException {
public void run(Connection conn) throws SQLException {

DatabaseInformation databaseInformation = new DefaultDatabaseInformation();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.utplsql.api.compatibility;

import org.utplsql.api.DBHelper;
import org.utplsql.api.TestRunnerOptions;
import org.utplsql.api.Version;
import org.utplsql.api.db.DatabaseInformation;
Expand All @@ -12,10 +11,8 @@
import org.utplsql.api.testRunner.TestRunnerStatement;
import org.utplsql.api.testRunner.TestRunnerStatementProvider;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Objects;

/** Class to check compatibility with database framework and also to give several specific implementations depending
Expand Down Expand Up @@ -120,13 +117,9 @@ private boolean versionCompatibilityCheckPre303(String requested )
Version requestedVersion = new Version(requested);

Objects.requireNonNull(databaseVersion.getMajor(), "Illegal database Version: " + databaseVersion.toString());
if (
databaseVersion.getMajor().equals(requestedVersion.getMajor())
&& (requestedVersion.getMinor() == null
|| requestedVersion.getMinor().equals(databaseVersion.getMinor())) )
return true;
else
return false;
return databaseVersion.getMajor().equals(requestedVersion.getMajor())
&& (requestedVersion.getMinor() == null
|| requestedVersion.getMinor().equals(databaseVersion.getMinor()));
}

/** Checks if actual API-version is compatible with utPLSQL database version and throws a DatabaseNotCompatibleException if not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public void printAvailable(Connection conn, List<PrintStream> printStreams) thro
}

@Override
public void fetchAvailable(Connection conn, Consumer<String> onLineFetched) throws SQLException {
public void fetchAvailable(Connection conn, Consumer<String> onLineFetched) {
onLineFetched.accept(null);
}

@Override
public List<String> fetchAll(Connection conn) throws SQLException {
public List<String> fetchAll(Connection conn) {
return new ArrayList<>();
}
}
2 changes: 1 addition & 1 deletion src/test/java/org/utplsql/api/OutputBufferIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void fetchAllLines() throws SQLException {
}

@Test
public void getOutputFromSonarReporter() throws SQLException, InvalidVersionException {
public void getOutputFromSonarReporter() throws SQLException {
Reporter reporter = new DefaultReporter(CoreReporters.UT_SONAR_TEST_REPORTER.name(), null).init(newConnection());

new TestRunner()
Expand Down

0 comments on commit 9b0452c

Please sign in to comment.