Try this
| public void setField(String field) {
| if(field == null) {
| this.field = null;
| } else {
| if("".equals(field.trim())) {
| this.field = field;
| } else {
| //you could trim before asignement too.
| this.field = field;
| }
| }
| }
|
To eliminate multiple spaces.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084045#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...