2006-05-16

Integer.parseInt()

在org.jbpm.webapp.tag.ProcessImageTag看到这个代码:
result[0] = Integer.valueOf(node.attribute("x").getValue()).intValue();
看着不怎么舒服,其实有个更简洁的途径:
result[0] = Integer.parseInt(node.attribute("x").getValue());
这个是好久以前就知道的,现在看到代码就突然想起来了,先记一下,嘿

No comments: