James Moger
2015-12-08 f7e28a481bcf86070b829e2574b6d5202124bb0a
Merge pull request #979 from pingunaut/master

Remove empty catch blocks to stop swallowing exceptions. #498
1 files modified
21 ■■■■■ changed files
src/main/java/com/gitblit/client/GitblitClient.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/client/GitblitClient.java
@@ -33,10 +33,6 @@
import com.gitblit.Constants.AuthorizationControl;
import com.gitblit.Constants.PermissionType;
import com.gitblit.Constants.RegistrantType;
import com.gitblit.GitBlitException.ForbiddenException;
import com.gitblit.GitBlitException.NotAllowedException;
import com.gitblit.GitBlitException.UnauthorizedException;
import com.gitblit.GitBlitException.UnknownRequestException;
import com.gitblit.Keys;
import com.gitblit.models.FederationModel;
import com.gitblit.models.FeedEntryModel;
@@ -119,7 +115,6 @@
        refreshRepositories();
        refreshSubscribedFeeds(0);
        try {
            // credentials may not have administrator access
            // or server may have disabled rpc management
            refreshUsers();
@@ -127,26 +122,12 @@
                refreshTeams();
            }
            allowManagement = true;
        } catch (UnauthorizedException e) {
        } catch (ForbiddenException e) {
        } catch (NotAllowedException e) {
        } catch (UnknownRequestException e) {
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            // credentials may not have administrator access
            // or server may have disabled rpc administration
            refreshStatus();
            allowAdministration = true;
        } catch (UnauthorizedException e) {
        } catch (ForbiddenException e) {
        } catch (NotAllowedException e) {
        } catch (UnknownRequestException e) {
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public int getProtocolVersion() {