Skip to content

Commit

Permalink
Merge pull request #9620 from JabRef/fixMultilineForCustomFields
Browse files Browse the repository at this point in the history
Fix storing multiline properties for custom fields in custom entry types
  • Loading branch information
Siedlerchr authored Feb 16, 2023
2 parents cdc5508 + 7a3e821 commit 98c9cbb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where the "Import" -> "Library to import to" did not show the correct library name if two opened libraries had the same suffix [#9567](https://github.com/JabRef/jabref/issues/9567)
- We fixed an issue where the rpm-Version of JabRef could not be properly uninstalled and reinstalled [#9558](https://github.com/JabRef/jabref/issues/9558), [#9603](https://github.com/JabRef/jabref/issues/9603)
- We fixed an issue where the command line export using `--exportMatches` flag does not create an output bib file [#9581](https://github.com/JabRef/jabref/issues/9581)

- We fixed an issue where custom field in the custom entry types could not be set to mulitline [#9609](https://github.com/JabRef/jabref/issues/9609)



Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/model/entry/field/IEEEField.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public enum IEEEField implements Field {
this.properties = EnumSet.of(first, rest);
}

public static <T> Optional<IEEEField> fromName(String name) {
public static Optional<IEEEField> fromName(String name) {
return Arrays.stream(IEEEField.values())
.filter(field -> field.getName().equalsIgnoreCase(name))
.findAny();
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/org/jabref/model/entry/field/UnknownField.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@

public class UnknownField implements Field {
private final String name;
private final Set<FieldProperty> properties;

public UnknownField(String name) {
this.name = name;
this.properties = EnumSet.noneOf(FieldProperty.class);
}

public UnknownField(String name, FieldProperty first, FieldProperty... rest) {
this.name = name;
this.properties = EnumSet.of(first, rest);
}

@Override
public Set<FieldProperty> getProperties() {
return EnumSet.noneOf(FieldProperty.class);
return properties;
}

@Override
Expand Down Expand Up @@ -47,7 +54,7 @@ public int hashCode() {
@Override
public String toString() {
return "UnknownField{" +
"name='" + name + '\'' +
'}';
"name='" + name + '\'' +
'}';
}
}

0 comments on commit 98c9cbb

Please sign in to comment.