@Nonnull
    public UserDetails loadUserByUsername(String idOrFullName) throws UsernameNotFoundException, DataAccessException, ExecutionException {
        Boolean exists = existenceCache.getIfPresent(idOrFullName);
        if(exists != null && !exists) {
            throw new UsernameNotFoundException(String.format("\"%s\" does not exist", idOrFullName));
        } else {
            try {
                return detailsCache.get(idOrFullName, new Retriever(idOrFullName));
            } catch (ExecutionException | UncheckedExecutionException e) {
                if (e.getCause() instanceof UsernameNotFoundException) {
                    throw ((UsernameNotFoundException)e.getCause());
                } else if (e.getCause() instanceof DataAccessException) {
                    throw ((DataAccessException)e.getCause());
                } else {
                    throw e;
                }
            }
        }
    }
@ Nonnull public UserDetails loadUserByUsername ( String idOrFullName ) throws UsernameNotFoundException , DataAccessException , ExecutionException { Boolean exists = existenceCache . getIfPresent ( idOrFullName ) ; if ( exists != null && ! exists ) { throw new UsernameNotFoundException ( String . format ( "\"%s\" does not exist" , idOrFullName ) ) ; } else { try { return detailsCache . get ( idOrFullName , new Retriever ( idOrFullName ) ) ; } catch ( ExecutionException | UncheckedExecutionException e ) { if ( e . getCause ( ) instanceof UsernameNotFoundException ) { throw ( ( UsernameNotFoundException ) e . getCause ( ) ) ; } else if ( e . getCause ( ) instanceof DataAccessException ) { throw ( ( DataAccessException ) e . getCause ( ) ) ; } else { throw e ; } } } }
Locates the user based on the username, by first looking in the cache and then delegate to
{@link hudson.security.SecurityRealm#loadUserByUsername(String)}.

@param idOrFullName the username
@return the details

@throws UsernameNotFoundException (normally a {@link hudson.security.UserMayOrMayNotExistException})
if the user could not be found or the user has no GrantedAuthority
@throws DataAccessException if user could not be found for a repository-specific reason
@throws ExecutionException if anything else went wrong in the cache lookup/retrieval