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

Bump pdfbox dependency versions #72

Merged
merged 4 commits into from
Jul 29, 2015
Merged
Show file tree
Hide file tree
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
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