/** * Checks to see whether a user is an artist given an artist id. * * <p>TODO: this method is duplicated across two activities. Find a way to refactor to a common * place. * * @param userId the user id * @return the boolean */ private Boolean isArtist(String userId) { Boolean isArtistResult = Boolean.FALSE; if (userId == null) { return isArtistResult; } else { try { RestResult<ArtistEntity> result = getArtistTaskProvider.get().execute(userId).get(); isArtistResult = result.isSuccessfull(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } } return isArtistResult; }