Skip to content

Commit aff67cf

Browse files
authored
Merge pull request #137 from harrigan/fix-exception-typo
Fix typo in exception class name
2 parents 0591402 + 7552aaa commit aff67cf

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/main/java/org/lmdbjava/LmdbNativeException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public final int getResultCode() {
5757
/**
5858
* Exception raised from a system constant table lookup.
5959
*/
60-
public static final class ConstantDerviedException extends LmdbNativeException {
60+
public static final class ConstantDerivedException extends LmdbNativeException {
6161

6262
private static final long serialVersionUID = 1L;
6363

64-
ConstantDerviedException(final int rc, final String message) {
64+
ConstantDerivedException(final int rc, final String message) {
6565
super(rc, "Platform constant error code: " + message);
6666
}
6767
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static void checkRc(final int rc) {
110110
throw new IllegalArgumentException("Unknown result code " + rc);
111111
}
112112
final String msg = constant.name() + " " + constant.toString();
113-
throw new LmdbNativeException.ConstantDerviedException(rc, msg);
113+
throw new LmdbNativeException.ConstantDerivedException(rc, msg);
114114
}
115115

116116
}

src/test/java/org/lmdbjava/DbiTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
import static org.lmdbjava.EnvFlags.MDB_NOSUBDIR;
6868
import static org.lmdbjava.GetOp.MDB_SET_KEY;
6969
import static org.lmdbjava.KeyRange.atMost;
70-
import org.lmdbjava.LmdbNativeException.ConstantDerviedException;
70+
import org.lmdbjava.LmdbNativeException.ConstantDerivedException;
7171
import static org.lmdbjava.PutFlags.MDB_NODUPDATA;
7272
import static org.lmdbjava.PutFlags.MDB_NOOVERWRITE;
7373
import static org.lmdbjava.TestUtils.DB_1;
@@ -98,7 +98,7 @@ public void before() throws IOException {
9898
.open(path, MDB_NOSUBDIR);
9999
}
100100

101-
@Test(expected = ConstantDerviedException.class)
101+
@Test(expected = ConstantDerivedException.class)
102102
public void close() {
103103
final Dbi<ByteBuffer> db = env.openDbi(DB_1, MDB_CREATE);
104104
db.put(bb(1), bb(42));

src/test/java/org/lmdbjava/ResultCodeMapperTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import org.lmdbjava.Env.MapFullException;
4444
import org.lmdbjava.Env.ReadersFullException;
4545
import org.lmdbjava.Env.VersionMismatchException;
46-
import org.lmdbjava.LmdbNativeException.ConstantDerviedException;
46+
import org.lmdbjava.LmdbNativeException.ConstantDerivedException;
4747
import org.lmdbjava.LmdbNativeException.PageCorruptedException;
4848
import org.lmdbjava.LmdbNativeException.PageFullException;
4949
import org.lmdbjava.LmdbNativeException.PageNotFoundException;
@@ -103,7 +103,7 @@ public void checkErrAll() {
103103
}
104104
}
105105

106-
@Test(expected = ConstantDerviedException.class)
106+
@Test(expected = ConstantDerivedException.class)
107107
public void checkErrConstantDerived() {
108108
checkRc(20);
109109
}
@@ -113,7 +113,7 @@ public void checkErrConstantDerivedMessage() {
113113
try {
114114
checkRc(2);
115115
fail("Should have raised exception");
116-
} catch (final ConstantDerviedException ex) {
116+
} catch (final ConstantDerivedException ex) {
117117
assertThat(ex.getMessage(), containsString("No such file or directory"));
118118
}
119119
}

0 commit comments

Comments
 (0)