- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {StringBuilder s =
new StringBuilder()
new StringBuilder(32)
String str;new StringBuilder(str)
- Smart code suggestions by Codota
}
@VisibleForTesting Iterable<ApplicationUser> findUsersWithPermission(final Iterable<Integer> permissions, final String name, Either<Project, Issue> projectOrIssue, boolean allowEmptyQuery, Integer maxResults) { final Predicate<User> permissionPredicate = Either.merge(projectOrIssue.left().map(new Function<Project, Predicate<User>>() { @Override public Predicate<User> apply(Project project) { return createProjectPredicate(permissions, project); } }).right().map(new Function<Issue, Predicate<User>>() { @Override public Predicate<User> apply(Issue issue) { return createIssuePredicate(permissions, issue); } })); return userPickerHelper.findUsers(name, true, false, allowEmptyQuery, permissionPredicate, maxResults); }
private <T> T raiseExceptionOnError(final Either<AttachmentError, T> result) throws AttachmentException { return Eithers.getOrThrow(result.left().map(new Function<AttachmentError, AttachmentException>() { @Override public AttachmentException apply(final AttachmentError attachmentError) { return new AttachmentException(String.format("Got error while saving attachment %s: %s", attachmentError.getFilename(), attachmentError.getLogMessage()), attachmentError.getException().getOrNull()); } })); }