Skip to content

Commit 74ea36f

Browse files
author
yizhenqiang
committed
Fix some minor issues discovered by PMD (Programming Mistake Detector) plugins
1 parent 9cf6510 commit 74ea36f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: dubbo-test/dubbo-test-check/src/main/java/org/apache/dubbo/test/check/registrycenter/initializer/UnpackZookeeperInitializer.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ protected void doInitialize(ZookeeperContext context) throws DubboTestException
8787
// get the file name, just like apache-zookeeper-{version}-bin
8888
// the version we maybe unknown if the zookeeper archive binary file is copied by user self.
8989
Path parentPath = Paths.get(context.getSourceFile().getParent().toString(), String.valueOf(clientPort));
90-
if (!Files.exists(parentPath) || !parentPath.toFile().isDirectory()) {
90+
if (!Files.exists(parentPath)
91+
|| !parentPath.toFile().isDirectory()) {
9192
throw new IllegalStateException("There is something wrong in unpacked file!");
9293
}
9394

@@ -100,7 +101,9 @@ protected void doInitialize(ZookeeperContext context) throws DubboTestException
100101
File targetFile = Paths.get(parentPath.toString(), context.getUnpackedDirectory()).toFile();
101102
sourceFile.renameTo(targetFile);
102103
if (!Files.exists(targetFile.toPath()) || !targetFile.isDirectory()) {
103-
throw new IllegalStateException(String.format("Failed to rename the directory. source directory: %s, target directory: %s", sourceFile.toPath(), targetFile.toPath()));
104+
throw new IllegalStateException(String.format(
105+
"Failed to rename the directory. source directory: %s, target directory: %s",
106+
sourceFile.toPath(), targetFile.toPath()));
104107
}
105108
// get the bin path
106109
Path zookeeperBin = Paths.get(targetFile.toString(), "bin");

0 commit comments

Comments
 (0)