Skip to content

Commit

Permalink
clean the code
Browse files Browse the repository at this point in the history
  • Loading branch information
okabe_JYSSH26 committed Dec 7, 2015
1 parent ac35d36 commit 261ea34
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
15 changes: 8 additions & 7 deletions src/main/java/com/rusticisoftware/tincan/Statement.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.util.List;
import java.util.UUID;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
Expand All @@ -29,10 +34,6 @@
import com.rusticisoftware.tincan.internal.StatementBase;
import com.rusticisoftware.tincan.json.StringOfJSON;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
* Statement Class
*/
Expand All @@ -44,7 +45,7 @@ public class Statement extends StatementBase {
private DateTime stored;
private Agent authority;
private TCAPIVersion version;

@Deprecated
private Boolean voided;

Expand All @@ -65,12 +66,12 @@ public Statement(JsonNode jsonNode) throws URISyntaxException, MalformedURLExcep
if (! authorityNode.isMissingNode()) {
this.setAuthority(Agent.fromJson(authorityNode));
}

JsonNode voidedNode = jsonNode.path("voided");
if (! voidedNode.isMissingNode()) {
this.setVoided(voidedNode.asBoolean());
}

JsonNode versionNode = jsonNode.path("version");
if (! versionNode.isMissingNode()) {
this.setVersion(TCAPIVersion.fromString(versionNode.textValue()));
Expand Down
7 changes: 4 additions & 3 deletions src/test/java/com/rusticisoftware/tincan/StatementTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
*/
package com.rusticisoftware.tincan;

import static com.rusticisoftware.tincan.TestUtils.*;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static com.rusticisoftware.tincan.TestUtils.assertSerializeDeserialize;
import static com.rusticisoftware.tincan.TestUtils.getAgent;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -28,6 +27,8 @@

import com.rusticisoftware.tincan.json.StringOfJSON;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
/**
* Description
*/
Expand Down

0 comments on commit 261ea34

Please sign in to comment.