Skip to content

Commit 9b0452c

Browse files
committed
Tidying up
1 parent 6d12174 commit 9b0452c

File tree

6 files changed

+9
-16
lines changed

6 files changed

+9
-16
lines changed

src/main/java/org/utplsql/api/FileMapping.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private void setObjectType(String objectType) {
5757
}
5858

5959
@Override
60-
public String getSQLTypeName() throws SQLException {
60+
public String getSQLTypeName() {
6161
return CustomTypes.UT_FILE_MAPPING;
6262
}
6363

src/main/java/org/utplsql/api/KeyValuePair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public String getValue() {
2727
}
2828

2929
@Override
30-
public String getSQLTypeName() throws SQLException {
30+
public String getSQLTypeName() {
3131
return CustomTypes.UT_KEY_VALUE_PAIR;
3232
}
3333

src/main/java/org/utplsql/api/TestRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private void delayedAddReporters() {
120120
throw new IllegalStateException("ReporterFactory must be set to add delayed Reporters!");
121121
}
122122

123-
public void run(Connection conn) throws SomeTestsFailedException, SQLException, DatabaseNotCompatibleException, UtPLSQLNotInstalledException {
123+
public void run(Connection conn) throws SQLException {
124124

125125
DatabaseInformation databaseInformation = new DefaultDatabaseInformation();
126126

src/main/java/org/utplsql/api/compatibility/CompatibilityProxy.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.utplsql.api.compatibility;
22

3-
import org.utplsql.api.DBHelper;
43
import org.utplsql.api.TestRunnerOptions;
54
import org.utplsql.api.Version;
65
import org.utplsql.api.db.DatabaseInformation;
@@ -12,10 +11,8 @@
1211
import org.utplsql.api.testRunner.TestRunnerStatement;
1312
import org.utplsql.api.testRunner.TestRunnerStatementProvider;
1413

15-
import java.sql.CallableStatement;
1614
import java.sql.Connection;
1715
import java.sql.SQLException;
18-
import java.sql.Types;
1916
import java.util.Objects;
2017

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

122119
Objects.requireNonNull(databaseVersion.getMajor(), "Illegal database Version: " + databaseVersion.toString());
123-
if (
124-
databaseVersion.getMajor().equals(requestedVersion.getMajor())
125-
&& (requestedVersion.getMinor() == null
126-
|| requestedVersion.getMinor().equals(databaseVersion.getMinor())) )
127-
return true;
128-
else
129-
return false;
120+
return databaseVersion.getMajor().equals(requestedVersion.getMajor())
121+
&& (requestedVersion.getMinor() == null
122+
|| requestedVersion.getMinor().equals(databaseVersion.getMinor()));
130123
}
131124

132125
/** Checks if actual API-version is compatible with utPLSQL database version and throws a DatabaseNotCompatibleException if not

src/main/java/org/utplsql/api/outputBuffer/NonOutputBuffer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ public void printAvailable(Connection conn, List<PrintStream> printStreams) thro
4747
}
4848

4949
@Override
50-
public void fetchAvailable(Connection conn, Consumer<String> onLineFetched) throws SQLException {
50+
public void fetchAvailable(Connection conn, Consumer<String> onLineFetched) {
5151
onLineFetched.accept(null);
5252
}
5353

5454
@Override
55-
public List<String> fetchAll(Connection conn) throws SQLException {
55+
public List<String> fetchAll(Connection conn) {
5656
return new ArrayList<>();
5757
}
5858
}

src/test/java/org/utplsql/api/OutputBufferIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void fetchAllLines() throws SQLException {
110110
}
111111

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

116116
new TestRunner()

0 commit comments

Comments
 (0)