Skip to content

Commit

Permalink
removed unneeded commons-io dependency
Browse files Browse the repository at this point in the history
refactored string into constants
  • Loading branch information
simplesteph committed Apr 30, 2017
1 parent f607cc8 commit 9de09cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/simplesteph/kafka/model/Issue.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,12 @@ public static Issue fromJson(JSONObject jsonObject) {
issue.withState(jsonObject.getString(STATE_FIELD));

// user is mandatory
User user = User.fromJson(jsonObject.getJSONObject("user"));
User user = User.fromJson(jsonObject.getJSONObject(USER_FIELD));
issue.withUser(user);

// pull request is an optional fields
if (jsonObject.has("pull_request")){
PullRequest pullRequest = PullRequest.fromJson(jsonObject.getJSONObject("pull_request"));
if (jsonObject.has(PR_FIELD)){
PullRequest pullRequest = PullRequest.fromJson(jsonObject.getJSONObject(PR_FIELD));
issue.withPullRequest(pullRequest);
}

Expand Down

0 comments on commit 9de09cc

Please sign in to comment.