Skip to content

Commit

Permalink
Fix log4j version inconsistency (log4j-api and log4j-core versions we…
Browse files Browse the repository at this point in the history
…re inconsistent, causing "no such method" exception).
  • Loading branch information
patrikbjork committed Sep 6, 2023
1 parent 15ac319 commit fcf51c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public Document[] fetchDocuments(String feedId) throws IOException {
urlConnection.setConnectTimeout(TIMEOUT);
urlConnection.setReadTimeout(TIMEOUT);

InputStream inputStream = urlConnection.getInputStream();

return JSON_MAPPER.readValue(inputStream, Document[].class);
try (InputStream inputStream = urlConnection.getInputStream()) {
return JSON_MAPPER.readValue(inputStream, Document[].class);
}
}

public Document[] fetchDocumentsPutCache(String feedId) throws IOException {
Expand Down
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<junit.version>4.12</junit.version>
<liferay.version>7.4.13.u73</liferay.version>
<slf4j.version>1.7.36</slf4j.version>
<log4j.version>2.17.2</log4j.version>
<portlet-api.version>2.0</portlet-api.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<servlet-api.version>3.0.1</servlet-api.version>
Expand All @@ -60,17 +61,17 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.17.2</version>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.2</version>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down

0 comments on commit fcf51c3

Please sign in to comment.