concurrentmodificationexception hashmap in java
<p>I write following code but when this run it generate concurrentmodificationexception</p>

<pre><code>if( attendancePolicy.getType().equals( AttendanceConstants.EMPLOYEE_ATTENDANCE_POLICY ) ) {
    synchronized( attendancePolicy.getListEmployee() ) {
        for( EmployeeAttendancePolicy employeeAttendancePolicy : attendancePolicy.getListEmployee() ) {
            employeeInfo = employeeInfoSessionBeanLocal.findEmployeeInfoEntityByEmployeeInfoId( 
                    employeeAttendancePolicy.getEmployeeId() );

            if( employeeInfo != null ) {
                employeeAttendancePolicy.setEmpName( 
                        employeeInfo.getFirstName() + " " 
                        + employeeInfo.getMiddleName() + " "
                        + employeeInfo.getLastName() );

                company = companySessionBeanLocal.findCompanyById( employeeInfo.getCompanyId() );
                employeeAttendancePolicy.setCompanyName( company.getName() );

                department = departmentSessionBeanLocal.findDepartmentEntityByDepartmentId( 
                        employeeInfo.getDepartmentId() );
                employeeAttendancePolicy.setDepartmentName( department.getName() );
            }
            else {
                attendancePolicy.getListEmployee().remove( employeeAttendancePolicy );
            }
        }
    }
}
</code></pre>
