Skip to content

Commit

Permalink
[fix]排除空集合
Browse files Browse the repository at this point in the history
  • Loading branch information
yajuhua committed Sep 16, 2024
1 parent 62b1402 commit 24651a1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ public static CommandInfo parse(String[] args) throws Exception {

//去掉命令尾部的URL链接,如果有的话
try {
new URL(argList.get(argList.size() - 1));
argList.remove(argList.size() - 1);//去掉尾部链接
if (!argList.isEmpty()) {
new URL(argList.get(argList.size() - 1));
argList.remove(argList.size() - 1);//去掉尾部链接
}
} catch (MalformedURLException ignored) {

}
Expand Down

0 comments on commit 24651a1

Please sign in to comment.