1. Список говнокодов пользователя Grig

    Всего: 1

  2. Java / Говнокод #9344

    +67

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    @Transactional(readOnly = true)
        public Employee getByUsername(String username) throws SecurityException {
            Employee employee = employeeDaoDb.getByUsername(username);
    
            if (employee != null) {
                return employee;
            }
    
            employee = employeeDaoLdap.getByUsername(username);
    
            if (employee != null) {
                if (employee.getFirstName() == null && employee.getFamilyName() == null) {
                    employee.setFirstName(employee.getUsername());
                }
                return employeeDaoDb.save(employee);
            }
    
            return null;
        }

    Grig, 07 Февраля 2012

    Комментарии (4)