diff --git a/tigon-model/src/main/java/me/chyxion/tigon/json/ViewModelableSerializer.java b/tigon-model/src/main/java/me/chyxion/tigon/json/ViewModelableSerializer.java index 2a4e51b..6b7fe26 100644 --- a/tigon-model/src/main/java/me/chyxion/tigon/json/ViewModelableSerializer.java +++ b/tigon-model/src/main/java/me/chyxion/tigon/json/ViewModelableSerializer.java @@ -19,7 +19,7 @@ public class ViewModelableSerializer implements ObjectSerializer { @Override public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException { if (object != null) { - serializer.write(((ViewModelable) object).toMap()); + serializer.write(((ViewModelable) object).toMap()); } else { serializer.writeNull(); diff --git a/tigon-model/src/main/java/me/chyxion/tigon/model/ViewModel.java b/tigon-model/src/main/java/me/chyxion/tigon/model/ViewModel.java index 9277a15..8d9f24e 100644 --- a/tigon-model/src/main/java/me/chyxion/tigon/model/ViewModel.java +++ b/tigon-model/src/main/java/me/chyxion/tigon/model/ViewModel.java @@ -57,7 +57,8 @@ public class ViewModel /** * {@inheritDoc} */ - @Override + @Override + @SuppressWarnings("unchecked") public A getAttr(String name) { return attrs != null ? (A) attrs.get(name) : null; } @@ -93,7 +94,7 @@ public class ViewModel else { if (data instanceof ViewModelable) { mapRtn = new HashMap(); - mapRtn.put("data", ((ViewModelable) data).toMap()); + mapRtn.put("data", ((ViewModelable) data).toMap()); } else { Object jsonData = JSON.toJSON(data); diff --git a/tigon-model/src/main/java/me/chyxion/tigon/mybatis/Search.java b/tigon-model/src/main/java/me/chyxion/tigon/mybatis/Search.java index 9ee35fd..2a4bf0c 100644 --- a/tigon-model/src/main/java/me/chyxion/tigon/mybatis/Search.java +++ b/tigon-model/src/main/java/me/chyxion/tigon/mybatis/Search.java @@ -134,7 +134,7 @@ public class Search implements Serializable { criteria.add(new Criterion(CriterionType.IS_NULL, col, value)); } else if (value instanceof Collection) { - in(col, (Collection) value); + in(col, (Collection) value); } else if (value.getClass().isArray()) { in(col, (Object[]) value); diff --git a/tigon-model/src/main/java/me/chyxion/tigon/mybatis/SqlFragment.java b/tigon-model/src/main/java/me/chyxion/tigon/mybatis/SqlFragment.java index 988dd20..5745b1c 100644 --- a/tigon-model/src/main/java/me/chyxion/tigon/mybatis/SqlFragment.java +++ b/tigon-model/src/main/java/me/chyxion/tigon/mybatis/SqlFragment.java @@ -12,7 +12,9 @@ import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor public class SqlFragment implements Serializable { - private final String sql; + private static final long serialVersionUID = 1L; + + private final String sql; /** * {@inheritDoc} diff --git a/tigon-model/src/test/java/me/chyxion/tigon/test/ViewModelSerializerTest.java b/tigon-model/src/test/java/me/chyxion/tigon/test/ViewModelSerializerTest.java index 02e2819..043d89f 100644 --- a/tigon-model/src/test/java/me/chyxion/tigon/test/ViewModelSerializerTest.java +++ b/tigon-model/src/test/java/me/chyxion/tigon/test/ViewModelSerializerTest.java @@ -15,7 +15,8 @@ import java.util.Arrays; */ public class ViewModelSerializerTest { - @Test + @Test + @SuppressWarnings("unchecked") public void test() { SerializeConfig.getGlobalInstance() .put(ViewModel.class, new ViewModelableSerializer()); diff --git a/tigon-shiro-cache-redis/src/main/java/me/chyxion/tigon/shiro/cache/shiro/UserIdKeyRedisSessionCache.java b/tigon-shiro-cache-redis/src/main/java/me/chyxion/tigon/shiro/cache/shiro/UserIdKeyRedisSessionCache.java index 4a2b30f..171c51b 100644 --- a/tigon-shiro-cache-redis/src/main/java/me/chyxion/tigon/shiro/cache/shiro/UserIdKeyRedisSessionCache.java +++ b/tigon-shiro-cache-redis/src/main/java/me/chyxion/tigon/shiro/cache/shiro/UserIdKeyRedisSessionCache.java @@ -1,11 +1,10 @@ package me.chyxion.tigon.shiro.cache.shiro; import java.util.Set; -import org.slf4j.Logger; import java.io.Serializable; import java.util.Collection; import java.util.Collections; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; import java.util.concurrent.TimeUnit; import javax.annotation.PostConstruct; import org.springframework.util.Assert; @@ -25,9 +24,8 @@ import org.springframework.beans.factory.annotation.Autowired; * chyxion@163.com
* May 12, 2016 1:25:02 PM */ +@Slf4j public class UserIdKeyRedisSessionCache implements SessionCache { - private static final Logger log = - LoggerFactory.getLogger(UserIdKeyRedisSessionCache.class); @Autowired protected RedisTemplate redisTpl; @@ -166,6 +164,6 @@ public class UserIdKeyRedisSessionCache implements SessionCache { } protected ValueOperations valueOp() { - return redisTpl.opsForValue(); + return redisTpl.opsForValue(); } }