Skip to content

Commit

Permalink
fix issue JabRef#6199 finish checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
devinluo27 committed Apr 25, 2021
1 parent b1c3f75 commit 4d2d2dd
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,22 +265,20 @@ private Optional<String> getUrlValue(Url url) {
Optional<String> ret;
if (list.size() == 0) {
return Optional.empty();
}
else {
} else {
boolean isStyleExist = false;
int style_index = -1;
for(int i =0 ; i < list.size(); i++) {
if(list.get(i) instanceof Style){
for (int i = 0; i < list.size(); i++) {
if (list.get(i) instanceof Style) {
isStyleExist = true;
style_index = i;
}
}
if (!isStyleExist) {
ret = Optional.ofNullable((String) list.get(0))
ret = Optional.ofNullable((String) list.get(0))
.map(this::clean);
}
else {
ret = Optional.ofNullable((Style)list.get(style_index))
} else {
ret = Optional.ofNullable((Style) list.get(style_index))
.map(Style::getContent)
.map(this::clean);
}
Expand Down

0 comments on commit 4d2d2dd

Please sign in to comment.