Skip to content

Commit

Permalink
reduce the use of generic exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
car031 committed Jun 30, 2023
1 parent f6ffd36 commit b4f3b3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ public Folder createPath(Folder parent, String path, boolean inheritSecurity, Fo

String name = st.nextToken();

long child = queryForLong("SELECT ld_id FROM ld_folder WHERE ld_parentid=? AND ld_name=? AND ld_tenantid=?",
long child = queryForLong("SELECT ld_id FROM ld_folder WHERE ld_deleted=0 AND ld_parentid=? AND ld_name=? AND ld_tenantid=?",
folder.getId(), name, folder.getTenantId());

if (child == 0L) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public class GUIUser implements Serializable {

private boolean notifyCredentials = true;

private boolean passwordExpired = true;

private int passwordMinLenght = 0;

private boolean passwordExpires = false;

private boolean passwordExpired = false;

private String address = "";

private String postalCode = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ else if ("pdf".equals(hit.getDocRefType()))
guiHit.setAttributes(extList.toArray(new GUIAttribute[0]));
}

private List<Hit> doSearch(GUISearchOptions options, Session session, GUIResult result) {
private List<Hit> doSearch(GUISearchOptions options, Session session, GUIResult result) throws ServerException {
SearchOptions searchOptions = prepareSearchOptions(options, session);

// Retrieve the search machinery
Expand All @@ -160,7 +160,7 @@ private List<Hit> doSearch(GUISearchOptions options, Session session, GUIResult
return hits;
}

private SearchOptions prepareSearchOptions(GUISearchOptions options, Session session) {
private SearchOptions prepareSearchOptions(GUISearchOptions options, Session session) throws ServerException {
SearchOptions searchOptions = toSearchOptions(options);
searchOptions.setTenantId(session.getTenantId());

Expand Down Expand Up @@ -263,7 +263,7 @@ public static List<SearchOptions> getSearches(Session session) throws Persistenc
.collect(Collectors.toList());
}

protected GUISearchOptions toGUIOptions(SearchOptions searchOptions) {
protected GUISearchOptions toGUIOptions(SearchOptions searchOptions) throws ServerException {
GUISearchOptions op = new GUISearchOptions();
op.setType(searchOptions.getType());
op.setDescription(searchOptions.getDescription());
Expand Down Expand Up @@ -388,7 +388,7 @@ protected java.util.Date convertToJavaDate(Date source) {
return cal.getTime();
}

protected SearchOptions toSearchOptions(GUISearchOptions options) {
protected SearchOptions toSearchOptions(GUISearchOptions options) throws ServerException {
SearchOptions searchOptions = Search.newOptions(options.getType());
searchOptions.setTopOperator(options.getTopOperator());
searchOptions.setDescription(options.getDescription());
Expand Down

0 comments on commit b4f3b3c

Please sign in to comment.