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

Fix IEEE test #8320

Merged
merged 2 commits into from
Dec 11, 2021
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
3 changes: 2 additions & 1 deletion src/main/java/org/jabref/logic/net/URLDownload.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public URLDownload(String source) throws MalformedURLException {
public URLDownload(URL source) {
this.source = source;
this.addHeader("User-Agent", URLDownload.USER_AGENT);
bypassSSLVerification();
}

/**
Expand Down Expand Up @@ -200,7 +201,7 @@ public boolean canBeReached() throws UnirestException {
Unirest.config().setDefaultHeader("User-Agent", "Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");

int statusCode = Unirest.head(source.toString()).asString().getStatus();
return statusCode >= 200 && statusCode < 300;
return (statusCode >= 200) && (statusCode < 300);
}

public boolean isMimeType(String type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static Stream<Arguments> provideTestData() {
.withField(StandardField.PUBLISHER, "Addison Wesley")
.withField(StandardField.YEAR, "2018")
.withField(StandardField.AUTHOR, "Bloch, Joshua")
.withField(StandardField.DATE, "2018-01-01")
.withField(StandardField.DATE, "2018-01-31")
.withField(new UnknownField("ean"), "9780134685991")
.withField(StandardField.ISBN, "0134685997")
.withField(StandardField.URL, "https://www.ebook.de/de/product/28983211/joshua_bloch_effective_java.html")
Expand All @@ -86,7 +86,7 @@ public static Stream<Arguments> provideTestData() {
.withField(StandardField.AUTHOR, "Barry Burd")
.withField(StandardField.MONTH, "jul")
.withField(StandardField.DOI, "10.1002/9781118257517")
.withCitationKey("2011"),
.withCitationKey("Burd_2011"),
"10.1002/9781118257517"
)
);
Expand Down