Skip to content

Commit 8258e48

Browse files
committed
Remove unchecked exceptions from method signatures
1 parent b0085a4 commit 8258e48

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/main/java/org/lmdbjava/Cursor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public T val() {
355355
return kv.val();
356356
}
357357

358-
private void checkNotClosed() throws ClosedException {
358+
private void checkNotClosed() {
359359
if (closed) {
360360
throw new ClosedException();
361361
}

src/main/java/org/lmdbjava/CursorIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public Iterable<KeyVal<T>> iterable() {
8888
}
8989

9090
@Override
91-
public KeyVal<T> next() throws NoSuchElementException {
91+
public KeyVal<T> next() {
9292
if (!hasNext()) {
9393
throw new NoSuchElementException();
9494
}

src/main/java/org/lmdbjava/ResultCodeMapper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ private ResultCodeMapper() {
5656
* Checks the result code and raises an exception is not {@link #MDB_SUCCESS}.
5757
*
5858
* @param rc the LMDB result code
59-
* @throws LmdbNativeException the resolved exception
6059
*/
61-
static void checkRc(final int rc) throws LmdbNativeException {
60+
static void checkRc(final int rc) {
6261
switch (rc) {
6362
case MDB_SUCCESS:
6463
return;

src/main/java/org/lmdbjava/Txn.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,19 @@ public T val() {
184184
return keyVal.val();
185185
}
186186

187-
void checkReadOnly() throws ReadOnlyRequiredException {
187+
void checkReadOnly() {
188188
if (!readOnly) {
189189
throw new ReadOnlyRequiredException();
190190
}
191191
}
192192

193-
void checkReady() throws NotReadyException {
193+
void checkReady() {
194194
if (state != READY) {
195195
throw new NotReadyException();
196196
}
197197
}
198198

199-
void checkWritesAllowed() throws ReadWriteRequiredException {
199+
void checkWritesAllowed() {
200200
if (readOnly) {
201201
throw new ReadWriteRequiredException();
202202
}

0 commit comments

Comments
 (0)