v3.0.0 GA Integer to Long

This commit is contained in:
Crystal.Sea
2021-09-28 14:27:43 +08:00
parent 9fd31d14c8
commit 045bf14bb6
3 changed files with 15 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ public class BeanConvert {
}else if(fieldType.equals("long")){
value=Long.parseLong(fillValue);
}else if(fieldType.equals("java.lang.Long")){
value=new Long(fillValue);
value= Long.parseLong(fillValue);
}else if(fieldType.equals("double")){
value=(double)Double.valueOf(fillValue);
}else if(fieldType.equals("java.lang.Double")){

View File

@@ -0,0 +1,13 @@
package org.maxkey;
public class Integer2LongTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
Integer intValue =20000;
Long v=Integer.toUnsignedLong(intValue);
System.out.println(v);
System.out.println(v.getClass());
}
}

View File

@@ -252,7 +252,7 @@ public class JwtAccessTokenConverter implements TokenEnhancer, AccessTokenConver
Map<String, Object> map = objectMapper.parseMap(content);
if (map.containsKey(EXP) && map.get(EXP) instanceof Integer) {
Integer intValue = (Integer) map.get(EXP);
map.put(EXP, new Long(intValue));
map.put(EXP, Integer.toUnsignedLong(intValue));
}
return map;
} catch (Exception e) {