Skip to content

Commit

Permalink
code lint issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Feb 27, 2018
1 parent cd1770e commit 2788aa2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/clivern/wit/Wit.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ public Wit(Config config)
/**
* Send A Call To Wit.Ai
*
* @param item Item Data to Send to Wit.AI
* @return Boolean the call status
* @throws DataNotValid Data are not valid
* @throws DataNotFound Some data are missing
* @throws IOException Unable to send the request
*/
public Boolean send(Contract item) throws DataNotValid, DataNotFound, IOException
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/clivern/wit/api/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public void setAccessToken(String accessToken)
/**
* Set the Entity ID
*
* @param offset The Entity Id
* @param entityId The Entity Id
*/
public void setEntityId(String entityId)
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/clivern/wit/api/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public Map<String, String> getHeaders()
}

/**
* Get Q (User’s query). Length must be > 0 and < 256
* Get Q (User’s query). Length must be more than 0 and less than 256
*
* @return String The users query
*/
Expand Down Expand Up @@ -270,7 +270,7 @@ public String getAccessToken()
}

/**
* Set Q (User’s query). Length must be > 0 and < 256
* Set Q (User’s query). Length must be more than 0 and less than 256
*
* @param q The users query
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/clivern/wit/exception/DataNotFound.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class DataNotFound extends Exception {
/**
* Class Constructor
*
* @param exception
* @param exception Exception Instance
*/
public DataNotFound(Exception exception)
{
Expand All @@ -33,7 +33,7 @@ public DataNotFound(Exception exception)
/**
* Class Constructor
*
* @param exception
* @param message Custom Message
*/
public DataNotFound(String message)
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/clivern/wit/exception/DataNotValid.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class DataNotValid extends Exception {
/**
* Class Constructor
*
* @param exception
* @param exception Exception Instance
*/
public DataNotValid(Exception exception)
{
Expand All @@ -33,7 +33,7 @@ public DataNotValid(Exception exception)
/**
* Class Constructor
*
* @param exception
* @param message Custom Message
*/
public DataNotValid(String message)
{
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/clivern/wit/util/Http.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import java.util.HashMap;
import java.util.Map;
import org.pmw.tinylog.Logger;
import java.net.URLEncoder;
import java.io.UnsupportedEncodingException;
import com.clivern.wit.exception.DataNotFound;
import okhttp3.OkHttpClient;
import okhttp3.MediaType;
Expand Down Expand Up @@ -75,8 +73,10 @@ public Http(String url, String method, Map<String, String> headers, String body)
* Execute The API Call
*
* @return String The Response
* @throws DataNotFound some data missing
* @throws IOException Unable to do the call
*/
public String execute() throws DataNotFound, IOException, UnsupportedEncodingException
public String execute() throws DataNotFound, IOException
{
if( !this.headers.containsKey("Content-Type") || !this.headers.containsKey("Authorization") ){
Logger.error("Error! Content-Type and Authorization required to make a request.");
Expand Down

0 comments on commit 2788aa2

Please sign in to comment.