-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into moveFileDir
* upstream/master: Save deletion of current searchquery (#2469) Update dev dependencies (mockito, wiremock, assertj) Update BouncyCastle (1.55->1.56), ANTRL4 (4.5.3->4.6), jsoup (1.10.1->1.10.2) Group all checker which only check the value of one field (#2437) Follow up #2428 (#2438) Fix conversion of "'n" and "\'{n}" from LaTeX to Unicode (#2464) Fix failing tests
- Loading branch information
Showing
39 changed files
with
471 additions
and
463 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
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
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
27 changes: 5 additions & 22 deletions
27
src/main/java/net/sf/jabref/logic/integrity/AbbreviationChecker.java
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 |
---|---|---|
@@ -1,34 +1,17 @@ | ||
package net.sf.jabref.logic.integrity; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
import net.sf.jabref.logic.integrity.IntegrityCheck.Checker; | ||
import net.sf.jabref.logic.l10n.Localization; | ||
import net.sf.jabref.model.entry.BibEntry; | ||
|
||
public class AbbreviationChecker implements Checker { | ||
|
||
private final String field; | ||
|
||
|
||
public AbbreviationChecker(String field) { | ||
this.field = field; | ||
} | ||
public class AbbreviationChecker implements ValueChecker { | ||
|
||
@Override | ||
public List<IntegrityMessage> check(BibEntry entry) { | ||
Optional<String> value = entry.getField(field); | ||
if (!value.isPresent()) { | ||
return Collections.emptyList(); | ||
} | ||
|
||
if (value.get().contains(".")) { | ||
return Collections | ||
.singletonList(new IntegrityMessage(Localization.lang("abbreviation detected"), entry, field)); | ||
public Optional<String> checkValue(String value) { | ||
if (value.contains(".")) { | ||
return Optional.of(Localization.lang("abbreviation detected")); | ||
} | ||
|
||
return Collections.emptyList(); | ||
return Optional.empty(); | ||
} | ||
} |
36 changes: 0 additions & 36 deletions
36
src/main/java/net/sf/jabref/logic/integrity/AuthorNameChecker.java
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
src/main/java/net/sf/jabref/logic/integrity/BiblatexPagesChecker.java
This file was deleted.
Oops, something went wrong.
22 changes: 5 additions & 17 deletions
22
src/main/java/net/sf/jabref/logic/integrity/BooktitleChecker.java
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 |
---|---|---|
@@ -1,30 +1,18 @@ | ||
package net.sf.jabref.logic.integrity; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Locale; | ||
import java.util.Optional; | ||
|
||
import net.sf.jabref.logic.integrity.IntegrityCheck.Checker; | ||
import net.sf.jabref.logic.l10n.Localization; | ||
import net.sf.jabref.model.entry.BibEntry; | ||
import net.sf.jabref.model.entry.FieldName; | ||
|
||
public class BooktitleChecker implements Checker { | ||
public class BooktitleChecker implements ValueChecker { | ||
|
||
@Override | ||
public List<IntegrityMessage> check(BibEntry entry) { | ||
String field = FieldName.BOOKTITLE; | ||
Optional<String> value = entry.getField(field); | ||
if (!value.isPresent()) { | ||
return Collections.emptyList(); | ||
public Optional<String> checkValue(String value) { | ||
if (value.toLowerCase(Locale.ENGLISH).endsWith("conference on")) { | ||
return Optional.of(Localization.lang("booktitle ends with 'conference on'")); | ||
} | ||
|
||
if (value.get().toLowerCase(Locale.ENGLISH).endsWith("conference on")) { | ||
return Collections.singletonList( | ||
new IntegrityMessage(Localization.lang("booktitle ends with 'conference on'"), entry, field)); | ||
} | ||
|
||
return Collections.emptyList(); | ||
return Optional.empty(); | ||
} | ||
} |
Oops, something went wrong.