Fix some spotbugs issues#3060
Merged
Merged
Conversation
stefan-kolb
reviewed
Aug 1, 2017
|
|
||
| // Key binding preferences | ||
| public static KeyBindingRepository getKeyPrefs() { | ||
| public static synchronized KeyBindingRepository getKeyPrefs() { |
Member
Author
There was a problem hiding this comment.
Incorrect lazy initialization
https://stackoverflow.com/a/6782690/3450689
| // Check if it is the preamble: | ||
| if ((preambleEditor != null) && (focused == preambleEditor.getFieldEditor())) { | ||
|
|
||
| FieldEditor f = (FieldEditor) focused; |
| BasePanel basePanel = frame.getBasePanelAt(i); | ||
| if ((basePanel.getBibDatabaseContext().getDatabaseFile().isPresent()) | ||
| && basePanel.getBibDatabaseContext().getDatabaseFile().get().equals(file)) { | ||
| if ((basePanel.getBibDatabaseContext().getDatabasePath().isPresent()) |
Member
Author
There was a problem hiding this comment.
This was the bug I fixed
| @Override | ||
| public boolean equals(Object other) { | ||
| if (this == other) { | ||
| public boolean equals(Object o) { |
Member
There was a problem hiding this comment.
other is a pretty good name for the parameter imho
Member
Author
There was a problem hiding this comment.
I renamed it to be consistent with the other implementations we have.
And there other is used as the name of the casted instance, see the line below
lenhard
approved these changes
Aug 1, 2017
lenhard
left a comment
Member
There was a problem hiding this comment.
Set a better name for the FieldEditor as metioned by Stefan and then this is ready to go.
Siedlerchr
added a commit
that referenced
this pull request
Aug 6, 2017
* upstream/master: Add warning message if group with same name is already present (#3077) Fix #3062: Ctrl + F works again Fix del/copy/paste key trigger main table action in search bar (#3070) Fix markdown Update gradle from 4.0.1 to 4.0.2 Fix #3045 Update Transformer plugin Reimplement MappedList using a backigList (#3069) Fix importing preferences after resetting without restarting (#3065) Fix some spotbugs issues (#3060) Import dialog when fetch (#3025) Adapt CircleCI build Adapt CI script Closes #3027 and updates install4j to v7
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some few issues, mostly some issues with equal:
https://spotbugs.github.io/
Change in CHANGELOG.md described
Tests created for changes
Screenshots added (for bigger UI changes)
Manually tested changed features in running JabRef
Check documentation status (Issue created for outdated help page at help.jabref.org?)
If you changed the localization: Did you run
gradle localizationUpdate?