Skip to content

Commit

Permalink
fix null point error
Browse files Browse the repository at this point in the history
  • Loading branch information
shalousun committed Jun 16, 2020
1 parent a9ab5d1 commit 90d4ab0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ These are only part of the companies using smart-doc, for reference only. If you
&nbsp;&nbsp;<img src="https://raw.githubusercontent.com/shalousun/smart-doc/dev/images/known-users/xiaomi.png" title="Xiaomi" width="170px" height="83px"/>
<img src="https://raw.githubusercontent.com/shalousun/smart-doc/dev/images/known-users/yuanmengjiankang.png" title="yuanmengjiankang" width="260px" height="83px"/>
<img src="https://raw.githubusercontent.com/shalousun/smart-doc/dev/images/known-users/zhongkezhilian.png" title="zhongkezhilian" width="272px" height="83px"/>
<img src="https://raw.githubusercontent.com/shalousun/smart-doc/dev/images/known-users/puqie_gaitubao_100x100.jpg" title="puqie" width="83px" height="83px"/>
<img src="https://raw.githubusercontent.com/shalousun/smart-doc/dev/images/known-users/puqie_gaitubao_100x100.jpg" title="puqie" width="83px" height="83px"/>&nbsp;&nbsp;
<img src="https://raw.githubusercontent.com/shalousun/smart-doc/dev/images/known-users/tianbo-tech.png" title="tianbo tech" width="127px" height="70px"/>

## License
smart-doc-gradle-plugin is under the Apache 2.0 license. See the [LICENSE](https://raw.githubusercontent.com/shalousun/smart-doc-maven-plugin/master/LICENSE) file for details.
## Contact
Expand Down
4 changes: 3 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ smart-doc-gradle-plugin is under the Apache 2.0 license. See the [LICENSE](htt
&nbsp;&nbsp;<img src="https://gitee.com/sunyurepository/smart-doc/raw/master/images/known-users/xiaomi.png" title="小米" width="170px" height="83px"/>
<img src="https://gitee.com/sunyurepository/smart-doc/raw/master/images/known-users/yuanmengjiankang.png" title="远盟健康" width="260px" height="83px"/>
<img src="https://gitee.com/sunyurepository/smart-doc/raw/master/images/known-users/zhongkezhilian.png" title="中科智链" width="272px" height="83px"/>
<img src="https://gitee.com/sunyurepository/smart-doc/raw/master/images/known-users/puqie_gaitubao_100x100.jpg" title="普切信息科技" width="83px" height="83px"/>
<img src="https://gitee.com/sunyurepository/smart-doc/raw/master/images/known-users/puqie_gaitubao_100x100.jpg" title="普切信息科技" width="83px" height="83px"/>&nbsp;&nbsp;
<img src="https://gitee.com/sunyurepository/smart-doc/raw/master/images/known-users/tianbo-tech.png" title="杭州天铂云科" width="127px" height="70px"/>


## Contact
愿意参与构建smart-doc或者是需要交流问题可以加入qq群:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ public interface GlobalConstants {
String RPC_MARKDOWN_TASK = "smartDocRpcMarkdown";

String EXTENSION_NAME = "smartdoc";

String SRC_MAIN_JAVA_PATH = "/src/main/java";
}
9 changes: 6 additions & 3 deletions src/main/java/com/smartdoc/gradle/task/DocBaseTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@ public void action() {
logger.quiet(GlobalConstants.ERROR_MSG);
return;
}
Path rpcConsumerPath = Paths.get(apiConfig.getRpcConsumerConfig());
if (!rpcConsumerPath.isAbsolute()) {
apiConfig.setRpcConsumerConfig(project.getProjectDir().getPath() + "/" + apiConfig.getRpcConsumerConfig());
if (Objects.nonNull(apiConfig.getRpcConsumerConfig())) {
Path rpcConsumerPath = Paths.get(apiConfig.getRpcConsumerConfig());
if (!rpcConsumerPath.isAbsolute()) {
apiConfig.setRpcConsumerConfig(project.getProjectDir().getPath() + "/" + apiConfig.getRpcConsumerConfig());
}
}

Path path = Paths.get(apiConfig.getOutPath());
if (!path.isAbsolute()) {
apiConfig.setOutPath(project.getProjectDir().getPath() + "/" + apiConfig.getOutPath());
Expand Down

0 comments on commit 90d4ab0

Please sign in to comment.