
java 基础
iteye_17060
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
string stringbuilder stringbuffer
提到 string、stringbuilder、 stringbuffer、大家都应该非常熟悉,通常的理解是:string 对象为final的,一旦被创建,就不能改变。stringbuffer 是可变对象,append(),不会新建对象,同时是线程安全的,stringbuilder 为线程不安全。有了上面的理解也就可以很容易的知道什么时候该用什么了, 仔细想想,好像...2011-03-11 21:31:19 · 88 阅读 · 0 评论 -
BeanUtils.copyProperties VS PropertyUtils.copyProperties
BeanUtils.copyProperties VS PropertyUtils.copyProperties 作为两个bean属性copy的工具类,他们被广泛使用,同时也很容易误用,给人造成困然;比如:昨天发现同事在使用BeanUtils.copyProperties copy有integer类型属性的bean时,没有考虑到会将null转换为0,而后面的业务依赖于null来判断,导...2013-05-17 23:09:59 · 329 阅读 · 0 评论 -
BeanUtils 的陷阱
由于BeanUtils 的美名远播,加之学艺不精;项目中想当然直接使用BeanUtils;结果华丽丽的掉进了陷阱;且看下面场景:1、待copy类public class SiteSupplierTrade { private Long longAttr; private String[] StringArrayAttr; private Inte...原创 2012-10-12 18:48:16 · 114 阅读 · 0 评论 -
OGNL & MVEL &java调用 性能误解
一、OGNL & MVEL关于OGNL的使用参见: http://www.ibm.com/developerworks/cn/opensource/os-cn-ognl/关于MVEL的使用参见:http://mvel.codehaus.org/Getting+Started+for+2.0 二、性能关于OGNL&MVEL两者的性能一开始看到 http://mv...2014-07-08 20:29:54 · 1152 阅读 · 0 评论