Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
hangc0276 committed Mar 4, 2024
1 parent e1295cd commit 81b6ef0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import org.apache.bookkeeper.stats.NullStatsLogger;
import org.apache.bookkeeper.zookeeper.ZooKeeperClient;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.Op;
Expand Down Expand Up @@ -333,7 +334,7 @@ private static LocalBookKeeper getLocalBookiesInternal(ServerConfiguration conf,
* @throws IOException
*/
private void serializeLocalBookieConfig(ServerConfiguration localBookieConfig, String fileName) throws IOException {
if (!fileName.endsWith(".conf")) {
if (StringUtils.isBlank(fileName) || !fileName.endsWith(".conf")) {
throw new IllegalArgumentException("File name should end with .conf");
}

Expand Down

0 comments on commit 81b6ef0

Please sign in to comment.