Skip to content

Commit

Permalink
Fix IEEE test (#8320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr authored Dec 11, 2021
1 parent 595c458 commit 42fb85c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 42fb85c

Please sign in to comment.