Skip to content

Commit 22720f1

Browse files
committed
refactor: use SQLFeatureNotSupportedException when possible
1 parent be935e1 commit 22720f1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/java/org/sqlite/jdbc3/JDBC3DatabaseMetaData.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.sql.DatabaseMetaData;
77
import java.sql.ResultSet;
88
import java.sql.SQLException;
9+
import java.sql.SQLFeatureNotSupportedException;
910
import java.sql.Statement;
1011
import java.sql.Struct;
1112
import java.sql.Types;
@@ -1851,13 +1852,13 @@ public ResultSet getGeneratedKeys() throws SQLException {
18511852

18521853
/** Not implemented yet. */
18531854
public Struct createStruct(String t, Object[] attr) throws SQLException {
1854-
throw new SQLException("Not yet implemented by SQLite JDBC driver");
1855+
throw new SQLFeatureNotSupportedException("Not yet implemented by SQLite JDBC driver");
18551856
}
18561857

18571858
/** Not implemented yet. */
18581859
public ResultSet getFunctionColumns(String a, String b, String c, String d)
18591860
throws SQLException {
1860-
throw new SQLException("Not yet implemented by SQLite JDBC driver");
1861+
throw new SQLFeatureNotSupportedException("Not yet implemented by SQLite JDBC driver");
18611862
}
18621863

18631864
// inner classes

src/main/java/org/sqlite/jdbc3/JDBC3ResultSet.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.sql.ResultSet;
1010
import java.sql.ResultSetMetaData;
1111
import java.sql.SQLException;
12+
import java.sql.SQLFeatureNotSupportedException;
1213
import java.sql.SQLWarning;
1314
import java.sql.Statement;
1415
import java.sql.Time;
@@ -135,8 +136,8 @@ public boolean isFirst() {
135136
}
136137

137138
/** @see java.sql.ResultSet#isLast() */
138-
public boolean isLast() throws SQLException { // FIXME
139-
throw new SQLException("function not yet implemented for SQLite");
139+
public boolean isLast() throws SQLException {
140+
throw new SQLFeatureNotSupportedException("not supported by sqlite");
140141
}
141142

142143
/** @see java.sql.ResultSet#getRow() */

0 commit comments

Comments
 (0)