-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace String[] with List<String> in BibtexEntryType
- Loading branch information
Showing
13 changed files
with
513 additions
and
842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,7 +156,7 @@ private String[] getRequiredFieldsSorted(BibtexEntry entry) { | |
|
||
// put into chache if necessary | ||
if (sortedFields == null) { | ||
sortedFields = entry.getRequiredFields().clone(); | ||
sortedFields = entry.getRequiredFields().stream().toArray(size -> new String[size]); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lenhard
Author
Member
|
||
Arrays.sort(sortedFields); | ||
requiredFieldsSorted.put(entryTypeName, sortedFields); | ||
} | ||
|
@@ -170,7 +170,7 @@ private String[] getOptionalFieldsSorted(BibtexEntry entry) { | |
|
||
// put into chache if necessary | ||
if (sortedFields == null) { | ||
sortedFields = entry.getOptionalFields().clone(); | ||
sortedFields = entry.getOptionalFields().stream().toArray(size -> new String[size]); | ||
Arrays.sort(sortedFields); | ||
optionalFieldsSorted.put(entryTypeName, sortedFields); | ||
} | ||
|
@@ -195,7 +195,7 @@ private void writeRequiredFieldsFirstRemainingFieldsSecond(BibtexEntry entry, Wr | |
written.add(BibtexEntry.KEY_FIELD); | ||
boolean hasWritten = false; | ||
// Write required fields first. | ||
String[] fields = entry.getRequiredFields(); | ||
List<String> fields = entry.getRequiredFields(); | ||
if (fields != null) { | ||
for (String value : fields) { | ||
hasWritten = hasWritten | writeField(entry, out, value, hasWritten); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Why isn't a new Collection made and Collections.sort() used? - Is sortedFields still an Array instead of a List?