Update of 
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person
In directory 
james.mmbase.org:/tmp/cvs-serv21550/community/src/java/com/finalist/cmsc/services/community/person

Modified Files:
        PersonHibernateService.java 
Log Message:
CMSC-907 - Fixed bad code constructions and did some improvements


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person
See also: http://www.mmbase.org/jira/browse/CMSC-907


Index: PersonHibernateService.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person/PersonHibernateService.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- PersonHibernateService.java 10 Jun 2008 09:48:25 -0000      1.6
+++ PersonHibernateService.java 3 Jul 2008 20:29:29 -0000       1.7
@@ -47,7 +47,7 @@
          return Collections.emptyList();
       }
 
-      List personList = 
getSession().createCriteria(Person.class).add(Example.create(example)).list();
+      List<Person> personList = 
getSession().createCriteria(Person.class).add(Example.create(example)).list();
       return personList;
 
    }
@@ -63,7 +63,7 @@
             enableLike(MatchMode.ANYWHERE).
             excludeZeroes().
             ignoreCase();
-      List personList = 
getSession().createCriteria(Person.class).add(userExample).list();
+      List<Person> personList = 
getSession().createCriteria(Person.class).add(userExample).list();
       return personList;
    }
 
@@ -125,8 +125,8 @@
 
    @SuppressWarnings("unchecked")
    private Person findPersonByCriteria(Criteria criteria) {
-      List personList = criteria.list();
-      return personList.size() == 1 ? (Person) personList.get(0) : null;
+      List<Person> personList = criteria.list();
+      return personList.size() == 1 ? personList.get(0) : null;
    }
 
    @Required
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to