| Conditions | 2 |
| Total Lines | 7 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package com.osomapps.pt.auth; |
||
| 20 | @Override |
||
| 21 | public UserDetails loadUserByUsername(String username) { |
||
| 22 | final List<PtUser> ptUsers = ptUserRepository.findByLogin(username); |
||
| 23 | if (ptUsers.isEmpty()) { |
||
| 24 | throw new UsernameNotFoundException("No user present with username: " + username); |
||
| 25 | } |
||
| 26 | return new CustomUserDetails(ptUsers.get(ptUsers.size() - 1)); |
||
| 27 | } |
||
| 29 |