Skip to content

Commit

Permalink
Merge pull request #72 from lenhard/master
Browse files Browse the repository at this point in the history
Bump pdfbox dependency versions
  • Loading branch information
simonharrer committed Jul 29, 2015
2 parents 4b20b50 + 4c3e0d5 commit b506e1a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[master]
- Streamline logging API: Replace usages of java.util.logging with commons.logging
- "ISBN to BibTeX" fetcher now uses eBook.de's API (fixes bug #1241)
- Update dependencies: jersey, commons.logging, pdfbox, jgoodies, lazedlists, JDBC connectors
- Refactored preferences
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ dependencies {

compile 'org.swinglabs:swingx:1.6.1'

compile 'org.apache.pdfbox:pdfbox:1.8.9'
compile 'org.apache.pdfbox:fontbox:1.8.9'
compile 'org.apache.pdfbox:jempbox:1.8.9'
compile 'org.apache.pdfbox:pdfbox:1.8.10'
compile 'org.apache.pdfbox:fontbox:1.8.10'
compile 'org.apache.pdfbox:jempbox:1.8.10'

compile 'commons-cli:commons-cli:1.3.1'

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/net/sf/jabref/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,9 @@ public ResourceBundle newBundle(String baseName, Locale locale,


private static int SHORTCUT_MASK = -1;
public static final int
FUTURE_YEAR = 2050; // Needs to give a year definitely in the future.
// Used for guessing the
// year field when parsing textual data. :-)

public static int STANDARD_EXPORT_COUNT = 5; // The number of standard export formats.
public static final int METADATA_LINE_LENGTH = 70; // The line length used to wrap metadata.
public static int STANDARD_EXPORT_COUNT = 5; // The number of standard export formats.
public static final int METADATA_LINE_LENGTH = 70; // The line length used to wrap metadata.

// used at highlighting in preview area.
// Color chosen similar to JTextComponent.getSelectionColor(), which is
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/net/sf/jabref/imports/TextAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@
import org.apache.commons.logging.LogFactory;

import net.sf.jabref.BibtexEntry;
import net.sf.jabref.Globals;

class TextAnalyzer {

private final BibtexEntry be = null;

private static final Log LOGGER = LogFactory.getLog(TextAnalyzer.class);


// Needs to give a year definitely in the future.
// Used for guessing the
// year field when parsing textual data. :-)
private static final int FUTURE_YEAR = 2050;

public TextAnalyzer(String text) {
guessBibtexFields(text);
Expand Down Expand Up @@ -72,10 +75,10 @@ private void guessBibtexFields(String text) {
yearFound = number;
} else {
// More than one found. Be a bit more specific.
if ((yearFound < Globals.FUTURE_YEAR) && (number < Globals.FUTURE_YEAR)) {
if ((yearFound < FUTURE_YEAR) && (number < FUTURE_YEAR)) {
good = -1;
break; // Give up, both seem good enough.
} else if ((yearFound >= Globals.FUTURE_YEAR) && (number < Globals.FUTURE_YEAR)) {
} else if ((yearFound >= FUTURE_YEAR) && (number < FUTURE_YEAR)) {
good = i;
yearFound = number;
}
Expand Down

0 comments on commit b506e1a

Please sign in to comment.