Skip to content

Commit 9de09cc

Browse files
committed
removed unneeded commons-io dependency
refactored string into constants
1 parent f607cc8 commit 9de09cc

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
<version>${junit.version}</version>
2828
<scope>test</scope>
2929
</dependency>
30-
<dependency>
31-
<groupId>commons-io</groupId>
32-
<artifactId>commons-io</artifactId>
33-
<version>2.4</version>
34-
<scope>test</scope>
35-
</dependency>
3630
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
3731
<dependency>
3832
<groupId>org.slf4j</groupId>

src/main/java/com/simplesteph/kafka/model/Issue.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,12 +405,12 @@ public static Issue fromJson(JSONObject jsonObject) {
405405
issue.withState(jsonObject.getString(STATE_FIELD));
406406

407407
// user is mandatory
408-
User user = User.fromJson(jsonObject.getJSONObject("user"));
408+
User user = User.fromJson(jsonObject.getJSONObject(USER_FIELD));
409409
issue.withUser(user);
410410

411411
// pull request is an optional fields
412-
if (jsonObject.has("pull_request")){
413-
PullRequest pullRequest = PullRequest.fromJson(jsonObject.getJSONObject("pull_request"));
412+
if (jsonObject.has(PR_FIELD)){
413+
PullRequest pullRequest = PullRequest.fromJson(jsonObject.getJSONObject(PR_FIELD));
414414
issue.withPullRequest(pullRequest);
415415
}
416416

0 commit comments

Comments
 (0)