Skip to content

Fix typo in exception class name #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/lmdbjava/LmdbNativeException.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public final int getResultCode() {
/**
* Exception raised from a system constant table lookup.
*/
public static final class ConstantDerviedException extends LmdbNativeException {
public static final class ConstantDerivedException extends LmdbNativeException {

private static final long serialVersionUID = 1L;

ConstantDerviedException(final int rc, final String message) {
ConstantDerivedException(final int rc, final String message) {
super(rc, "Platform constant error code: " + message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/lmdbjava/ResultCodeMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void checkRc(final int rc) {
throw new IllegalArgumentException("Unknown result code " + rc);
}
final String msg = constant.name() + " " + constant.toString();
throw new LmdbNativeException.ConstantDerviedException(rc, msg);
throw new LmdbNativeException.ConstantDerivedException(rc, msg);
}

}
4 changes: 2 additions & 2 deletions src/test/java/org/lmdbjava/DbiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
import static org.lmdbjava.EnvFlags.MDB_NOSUBDIR;
import static org.lmdbjava.GetOp.MDB_SET_KEY;
import static org.lmdbjava.KeyRange.atMost;
import org.lmdbjava.LmdbNativeException.ConstantDerviedException;
import org.lmdbjava.LmdbNativeException.ConstantDerivedException;
import static org.lmdbjava.PutFlags.MDB_NODUPDATA;
import static org.lmdbjava.PutFlags.MDB_NOOVERWRITE;
import static org.lmdbjava.TestUtils.DB_1;
Expand Down Expand Up @@ -98,7 +98,7 @@ public void before() throws IOException {
.open(path, MDB_NOSUBDIR);
}

@Test(expected = ConstantDerviedException.class)
@Test(expected = ConstantDerivedException.class)
public void close() {
final Dbi<ByteBuffer> db = env.openDbi(DB_1, MDB_CREATE);
db.put(bb(1), bb(42));
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/lmdbjava/ResultCodeMapperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import org.lmdbjava.Env.MapFullException;
import org.lmdbjava.Env.ReadersFullException;
import org.lmdbjava.Env.VersionMismatchException;
import org.lmdbjava.LmdbNativeException.ConstantDerviedException;
import org.lmdbjava.LmdbNativeException.ConstantDerivedException;
import org.lmdbjava.LmdbNativeException.PageCorruptedException;
import org.lmdbjava.LmdbNativeException.PageFullException;
import org.lmdbjava.LmdbNativeException.PageNotFoundException;
Expand Down Expand Up @@ -103,7 +103,7 @@ public void checkErrAll() {
}
}

@Test(expected = ConstantDerviedException.class)
@Test(expected = ConstantDerivedException.class)
public void checkErrConstantDerived() {
checkRc(20);
}
Expand All @@ -113,7 +113,7 @@ public void checkErrConstantDerivedMessage() {
try {
checkRc(2);
fail("Should have raised exception");
} catch (final ConstantDerviedException ex) {
} catch (final ConstantDerivedException ex) {
assertThat(ex.getMessage(), containsString("No such file or directory"));
}
}
Expand Down