重要:工程运行环境由jdk1.7调整为jdk1.6

This commit is contained in:
jinyu
2015-09-21 22:32:42 +08:00
parent 50b01790af
commit 03ca6e670a
15 changed files with 45 additions and 47 deletions
+3 -2
View File
@@ -48,8 +48,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.6</source>
<target>1.6</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
@@ -1,6 +1,5 @@
package com.foxinmy.weixin4j.qy.chat;
import java.beans.Transient;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
@@ -111,7 +110,6 @@ public class ChatItem implements Serializable {
return createTime;
}
@Transient
@XmlTransient
public Date getFormatCreateTime() {
return createTime > 0l ? new Date(createTime * 1000l) : null;
@@ -121,7 +119,6 @@ public class ChatItem implements Serializable {
return msgType;
}
@Transient
@XmlTransient
public MessageType getFormatMsgType() {
return msgType != null ? MessageType.valueOf(msgType) : null;
@@ -131,7 +128,6 @@ public class ChatItem implements Serializable {
return eventType;
}
@Transient
@XmlTransient
public ChatEventType getFormatEventType() {
return eventType != null ? ChatEventType.valueOf(eventType) : null;
@@ -153,7 +149,6 @@ public class ChatItem implements Serializable {
return members;
}
@Transient
@XmlTransient
public List<String> getFormatMembers() {
return members != null ? Arrays.asList(members.split(LIST_SEPARATOR))
@@ -164,7 +159,6 @@ public class ChatItem implements Serializable {
return addMembers;
}
@Transient
@XmlTransient
public List<String> getFormatAddMembers() {
return addMembers != null ? Arrays.asList(addMembers
@@ -175,7 +169,6 @@ public class ChatItem implements Serializable {
return deleteMembers;
}
@Transient
@XmlTransient
public List<String> getFormatDeleteMembers() {
return deleteMembers != null ? Arrays.asList(deleteMembers
@@ -1,6 +1,5 @@
package com.foxinmy.weixin4j.qy.chat;
import java.beans.Transient;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlElement;
@@ -37,7 +36,6 @@ public class ChatReceiver implements Serializable {
return chatType;
}
@Transient
@XmlTransient
public ChatType getFormatChatType() {
return ChatType.valueOf(chatType);
@@ -1,6 +1,5 @@
package com.foxinmy.weixin4j.qy.chat;
import java.beans.Transient;
import java.io.Serializable;
import java.util.List;
@@ -61,7 +60,6 @@ public class WeixinChatMessage implements Serializable {
return agentType;
}
@Transient
@XmlTransient
public AgentType getFormatAgentType() {
return AgentType.valueOf(agentType);
@@ -1,6 +1,5 @@
package com.foxinmy.weixin4j.qy.suite;
import java.beans.Transient;
import java.io.Serializable;
import java.util.Date;
@@ -58,7 +57,6 @@ public class WeixinSuiteMessage implements Serializable {
return eventType;
}
@Transient
@XmlTransient
public SuiteEventType getFormatEventType() {
return SuiteEventType.valueOf(eventType);
@@ -68,7 +66,6 @@ public class WeixinSuiteMessage implements Serializable {
return timeStamp;
}
@Transient
@XmlTransient
public Date getFormatTimeStamp() {
return timeStamp > 0l ? new Date(timeStamp * 1000l) : null;
@@ -1,6 +1,5 @@
package com.foxinmy.weixin4j.request;
import java.beans.Transient;
import java.io.Serializable;
import java.util.Date;
@@ -95,7 +94,6 @@ public class WeixinMessage implements Serializable {
return createTime;
}
@Transient
@XmlTransient
public Date getFormatCreateTime() {
return createTime > 0l ? new Date(createTime * 1000l) : null;
@@ -105,7 +103,6 @@ public class WeixinMessage implements Serializable {
return msgType;
}
@Transient
@XmlTransient
public MessageType getFormatMsgType() {
return MessageType.valueOf(msgType);
@@ -139,7 +139,9 @@ public final class ClassUtil {
bis = new ByteArrayInputStream(bos.toByteArray());
ois = new ObjectInputStream(bis);
return ois.readObject();
} catch (IOException | ClassNotFoundException e) {
} catch (IOException e) {
throw new RuntimeException(e);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
} finally {
try {
@@ -2,7 +2,6 @@ package com.foxinmy.weixin4j.server.test;
import java.io.IOException;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
@@ -14,6 +13,8 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import com.foxinmy.weixin4j.util.Consts;
/**
* 发送消息请求到服务器
*
@@ -51,7 +52,7 @@ public class MessagePush {
public String push(String para, String xml) throws IOException {
httpPost.setURI(URI.create(server + para));
httpPost.setEntity(new StringEntity(xml, StandardCharsets.UTF_8));
httpPost.setEntity(new StringEntity(xml, Consts.UTF_8));
HttpResponse httpResponse = httpClient.execute(httpPost);
return entity(httpResponse);
}
@@ -68,6 +69,6 @@ public class MessagePush {
throw new IOException(Integer.toString(status) + "uri moved");
}
return EntityUtils.toString(httpResponse.getEntity(),
StandardCharsets.UTF_8);
Consts.UTF_8);
}
}