mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
fix warnings
This commit is contained in:
@@ -19,6 +19,7 @@ import java.lang.reflect.Type;
|
||||
*/
|
||||
public class WxCpDepartGsonAdapter implements JsonSerializer<WxCpDepart>, JsonDeserializer<WxCpDepart> {
|
||||
|
||||
@Override
|
||||
public JsonElement serialize(WxCpDepart group, Type typeOfSrc, JsonSerializationContext context) {
|
||||
JsonObject json = new JsonObject();
|
||||
if (group.getId() != null) {
|
||||
@@ -36,6 +37,7 @@ public class WxCpDepartGsonAdapter implements JsonSerializer<WxCpDepart>, JsonDe
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpDepart deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
|
||||
throws JsonParseException {
|
||||
WxCpDepart depart = new WxCpDepart();
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.lang.reflect.Type;
|
||||
*/
|
||||
public class WxCpMessageGsonAdapter implements JsonSerializer<WxCpMessage> {
|
||||
|
||||
@Override
|
||||
public JsonElement serialize(WxCpMessage message, Type typeOfSrc, JsonSerializationContext context) {
|
||||
JsonObject messageJson = new JsonObject();
|
||||
messageJson.addProperty("agentid", message.getAgentId());
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.lang.reflect.Type;
|
||||
*/
|
||||
public class WxCpTagGsonAdapter implements JsonSerializer<WxCpTag>, JsonDeserializer<WxCpTag> {
|
||||
|
||||
@Override
|
||||
public JsonElement serialize(WxCpTag tag, Type typeOfSrc, JsonSerializationContext context) {
|
||||
JsonObject o = new JsonObject();
|
||||
o.addProperty("tagid", tag.getId());
|
||||
@@ -26,6 +27,7 @@ public class WxCpTagGsonAdapter implements JsonSerializer<WxCpTag>, JsonDeserial
|
||||
return o;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpTag deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
|
||||
throws JsonParseException {
|
||||
JsonObject jsonObject = json.getAsJsonObject();
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.lang.reflect.Type;
|
||||
*/
|
||||
public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSerializer<WxCpUser> {
|
||||
|
||||
@Override
|
||||
public WxCpUser deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
|
||||
throws JsonParseException {
|
||||
JsonObject o = json.getAsJsonObject();
|
||||
|
||||
@@ -45,7 +45,7 @@ public class XStreamTransformer {
|
||||
}
|
||||
|
||||
private static Map<Class, XStream> configXStreamInstance() {
|
||||
Map<Class, XStream> map = new HashMap<Class, XStream>();
|
||||
Map<Class, XStream> map = new HashMap<>();
|
||||
map.put(WxCpXmlMessage.class, config_WxCpXmlMessage());
|
||||
map.put(WxCpXmlOutNewsMessage.class, config_WxCpXmlOutNewsMessage());
|
||||
map.put(WxCpXmlOutTextMessage.class, config_WxCpXmlOutTextMessage());
|
||||
|
||||
Reference in New Issue
Block a user