Skip to content

Commit

Permalink
Fixed some warnings and modified the pom
Browse files Browse the repository at this point in the history
  • Loading branch information
sleroux committed Nov 29, 2012
1 parent 837e17a commit e7fd07f
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 53 deletions.
95 changes: 45 additions & 50 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,56 +1,51 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>postageapp</groupId>
<artifactId>postageapp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<groupId>postageapp</groupId>
<artifactId>postageapp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>postageapp</name>
<url>http://maven.apache.org</url>
<name>postageapp</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/main/java/postageapp/PostageAppClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public PostageAppClientImpl(final String apiKey) {
public long sendMessage(MessageParams params) throws PostageAppException {
Map<String, ?> data = this.getDataFromResponse(this.sendRequest(Endpoints.SEND_MESSAGE, params.toString()));
Map<String, String> message = (Map<String, String>) data.get("message");
return Long.parseLong((String) message.get("id"));
return Long.parseLong(message.get("id"));
}

@Override
public long getMessageReceipt(String messageUid) throws PostageAppException {
Map<String, ?> data = this.getDataFromResponse(this.sendRequest(Endpoints.GET_MESSAGE_RECEIPT, this.messageUidRequestString(messageUid)));
Map<String, String> message = (Map<String, String>) data.get("message");
return Long.parseLong((String) message.get("id"));
return Long.parseLong(message.get("id"));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/postageapp/http/PostageAppException.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void setMessageUid(String uid) {

@Override
public String toString() {
StringBuffer strBuffer = new StringBuffer();
StringBuilder strBuffer = new StringBuilder();
strBuffer.append("Error: ");

if (this.status != null) {
Expand Down

0 comments on commit e7fd07f

Please sign in to comment.