Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comment #11299

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/main/java/org/jabref/model/entry/BibEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.jabref.model.strings.StringUtil;
import org.jabref.model.util.MultiKeyMap;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.eventbus.EventBus;
import com.tobiasdiez.easybind.EasyBind;
import com.tobiasdiez.easybind.optional.OptionalBinding;
Expand Down Expand Up @@ -353,19 +354,22 @@ private Optional<String> genericGetResolvedFieldOrAlias(Field field, BibDatabase
}

/**
* Returns this entry's ID.
* Returns this entry's ID. It is used internally to distinguish different BibTeX entries.
* <p>
* It is <emph>not</emph> the citation key (which is stored in the {@link InternalField#KEY_FIELD} and also known as BibTeX key).
*/
public String getId() {
return id;
}

/**
* Sets this entry's identifier (ID). It is used internally to distinguish different BibTeX entries. It is <emph>not</emph> the citation key. The BibTexKey is the {@link InternalField#KEY_FIELD}.
* Sets this entry's identifier (ID).
* <p>
* The entry is also updated in the shared database - provided the database containing it doesn't veto the change.
*
* @param id The ID to be used
*/
@VisibleForTesting
public void setId(String id) {
Objects.requireNonNull(id, "Every BibEntry must have an ID");

Expand Down
Loading