[RocksJava] Incoroporated changes for D29013
This commit is contained in:
parent
a280af2a57
commit
94f70a86b9
@ -128,7 +128,10 @@ public class ColumnFamilyOptions extends RocksObject
|
|||||||
@Override
|
@Override
|
||||||
public ColumnFamilyOptions setMergeOperatorName(String name) {
|
public ColumnFamilyOptions setMergeOperatorName(String name) {
|
||||||
assert (isInitialized());
|
assert (isInitialized());
|
||||||
assert (name != null);
|
if (name == null) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Merge operator name must not be null.");
|
||||||
|
}
|
||||||
setMergeOperatorName(nativeHandle_, name);
|
setMergeOperatorName(nativeHandle_, name);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,10 @@ public class Options extends RocksObject
|
|||||||
@Override
|
@Override
|
||||||
public Options setMergeOperatorName(String name) {
|
public Options setMergeOperatorName(String name) {
|
||||||
assert (isInitialized());
|
assert (isInitialized());
|
||||||
assert (name != null);
|
if (name == null) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Merge operator name must not be null.");
|
||||||
|
}
|
||||||
setMergeOperatorName(nativeHandle_, name);
|
setMergeOperatorName(nativeHandle_, name);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ public class MergeTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = AssertionError.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void nullStringInSetMergeOperatorByNameOptions() {
|
public void nullStringInSetMergeOperatorByNameOptions() {
|
||||||
Options opt = null;
|
Options opt = null;
|
||||||
try {
|
try {
|
||||||
@ -286,7 +286,7 @@ public class MergeTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = AssertionError.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void
|
public void
|
||||||
nullStringInSetMergeOperatorByNameColumnFamilyOptions() {
|
nullStringInSetMergeOperatorByNameColumnFamilyOptions() {
|
||||||
ColumnFamilyOptions opt = null;
|
ColumnFamilyOptions opt = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user