add try catch
This commit is contained in:
parent
bd2d35aba4
commit
88addda10c
|
@ -461,13 +461,19 @@ public class MergeProjectNew2 {
|
|||
|
||||
public boolean compareGithubProject(GatherProjectsModel model1,
|
||||
GatherProjectsModel model2) {
|
||||
|
||||
if (platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,model1.getUrl())
|
||||
.getStargazers_count() > platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,
|
||||
model2.getUrl()).getStargazers_count())
|
||||
return true;
|
||||
else
|
||||
try{
|
||||
if (platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,model1.getUrl())
|
||||
.getStargazers_count() > platformProjectDao.getGithubPrjByUrl(TableName.githubTableName,
|
||||
model2.getUrl()).getStargazers_count())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
System.out.println(model1.getUrl());
|
||||
System.out.println(model2.getUrl());
|
||||
System.exit(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue