Skip to content

Commit bd3ad50

Browse files
authored
chore: remove assert statement in LedgerDescriptor (#4334)
Signed-off-by: ZhangJian He <[email protected]>
1 parent 5b3cd8d commit bd3ad50

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptorImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
public class LedgerDescriptorImpl extends LedgerDescriptor {
4141
private static final Logger LOG = LoggerFactory.getLogger(LedgerDescriptorImpl.class);
4242
final LedgerStorage ledgerStorage;
43-
private long ledgerId;
43+
private final long ledgerId;
4444
final byte[] masterKey;
4545

46-
private AtomicBoolean fenceEntryPersisted = new AtomicBoolean();
46+
private final AtomicBoolean fenceEntryPersisted = new AtomicBoolean();
4747
private CompletableFuture<Boolean> logFenceResult = null;
4848

4949
LedgerDescriptorImpl(byte[] masterKey,

bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptorReadOnlyImpl.java

-3
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,16 @@ public class LedgerDescriptorReadOnlyImpl extends LedgerDescriptorImpl {
3434

3535
@Override
3636
boolean setFenced() throws IOException {
37-
assert false;
3837
throw new IOException("Invalid action on read only descriptor");
3938
}
4039

4140
@Override
4241
long addEntry(ByteBuf entry) throws IOException {
43-
assert false;
4442
throw new IOException("Invalid action on read only descriptor");
4543
}
4644

4745
@Override
4846
void checkAccess(byte[] masterKey) throws BookieException, IOException {
49-
assert false;
5047
throw new IOException("Invalid action on read only descriptor");
5148
}
5249
}

0 commit comments

Comments
 (0)