Skip to content

Fix main table bug when creating a duplicate#2135

Merged
stefan-kolb merged 2 commits into
JabRef:masterfrom
chriba:fixBugWhenCreatingDuplicates
Oct 9, 2016
Merged

Fix main table bug when creating a duplicate#2135
stefan-kolb merged 2 commits into
JabRef:masterfrom
chriba:fixBugWhenCreatingDuplicates

Conversation

@chriba

@chriba chriba commented Oct 7, 2016

Copy link
Copy Markdown
Contributor

Steps to reproduce:

  • have at least 2 entries in a database
  • edit the lower one so that it matches the first one in every detail (creating a duplicate)
  • now the upper one will be internally replaced with the lower one (and will be lost visually), both entries in the table are now one and the same

This is again caused by the BibEntry#equals method which doesn't recognize duplicates, maybe we have to do something about that?

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good work 👍

// thus,
list.set(index, entryChangedEvent.getBibEntry());
// can't use list#indexOf b/c it won't distinguish between duplicates
for (int i=0; i<list.size(); i++) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use spaces between the arguments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@boceckts boceckts added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Oct 8, 2016
@stefan-kolb stefan-kolb merged commit bf91dcf into JabRef:master Oct 9, 2016
@chriba chriba deleted the fixBugWhenCreatingDuplicates branch October 9, 2016 09:49
Siedlerchr added a commit that referenced this pull request Oct 9, 2016
* upstream/master: (102 commits)
  Removed unused test code (#2140)
  Fix main table bug when creating a duplicate (#2135)
  Remove explicit author and add SPDX-License-Identifier
  Remove GPL from README.md and CONTRIBUTING.md
  fix preview update (#2125)
  Remove some UnicodeToLatex uses (#2132)
  Fix mixup in french/farsi localization
  FetcherException should extend JabRefException
  Fix exception when opening preference dialog (#2127)
  Unify ParserException and ParseException (#2124)
  Small refactoring in Importer package (#2053)
  Implement Datepicker "none"-button (#2122)
  revert change from 816d30c
  Change title/tooltip of source panel in biblatex mode (#2120)
  Refactoring: completey typed metadata and add detailed travis output (#2112)
  RTFchars fix (#2097)
  Fix NPE in Medline fetcher on missing ISSN (#2113)
  Ctrl-s parsing error message (#2114)
  Fix bad web search error messages (#2034)
  parse error freeze (#2106)
  ...

# Conflicts:
#	src/main/java/net/sf/jabref/collab/FileUpdateMonitor.java
#	src/main/java/net/sf/jabref/gui/externalfiles/DownloadExternalFile.java
#	src/main/java/net/sf/jabref/gui/externalfiles/DroppedFileHandler.java
#	src/main/java/net/sf/jabref/gui/externalfiles/MoveFileAction.java
#	src/main/java/net/sf/jabref/logic/cleanup/RenamePdfCleanup.java
#	src/main/java/net/sf/jabref/logic/exporter/FileSaveSession.java
#	src/main/java/net/sf/jabref/logic/util/io/FileUtil.java
#	src/main/java/net/sf/jabref/preferences/JabRefPreferences.java
zesaro pushed a commit to zesaro/jabref that referenced this pull request Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants