Skip to content

Commit

Permalink
Reverting
Browse files Browse the repository at this point in the history
  • Loading branch information
mairdl committed May 23, 2016
1 parent 4c3310b commit 7b980e2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/net/sf/jabref/logic/util/strings/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
package net.sf.jabref.logic.util.strings;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import net.sf.jabref.Globals;
import net.sf.jabref.model.entry.Author;
Expand Down Expand Up @@ -648,15 +646,15 @@ public static String expandAuthorInitials(String name) {
}
for (int j = 1; j < names.length; j++) {
if (j == 1) {
String innerNames = Arrays.stream(names[j].split(" "))
.map(Author::addDotIfAbbreviation)
.collect(Collectors.joining(" "));
sb.append(innerNames);
}
sb.append(Author.addDotIfAbbreviation(names[j]));
} else {
sb.append(names[j]);
}
if (j < (names.length - 1)) {
sb.append(", ");
}
}

} else {
String[] names = authors[i].split(" ");
if (names.length > 0) {
Expand All @@ -671,6 +669,7 @@ public static String expandAuthorInitials(String name) {
sb.append(" and ");
}
}

return sb.toString().trim();
}

Expand Down

0 comments on commit 7b980e2

Please sign in to comment.