diff options
author | Martin Spielmann <martin.spielmann@pingunaut.com> | 2015-12-08 14:30:11 +0100 |
---|---|---|
committer | Martin Spielmann <martin.spielmann@pingunaut.com> | 2015-12-08 14:30:11 +0100 |
commit | bb8d1a33e365df7a48dfb4238867b31436f600ca (patch) | |
tree | 2f8c93c8a51a576a2e121afc048d7208d379bd13 /src | |
parent | d1eb00e7e98ec4d932a632e52d336c43a4351cb4 (diff) | |
download | gitblit-bb8d1a33e365df7a48dfb4238867b31436f600ca.tar.gz gitblit-bb8d1a33e365df7a48dfb4238867b31436f600ca.zip |
Remove empty catch blocks to stop swallowing exceptions. #498
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/client/GitblitClient.java | 43 |
1 files changed, 12 insertions, 31 deletions
diff --git a/src/main/java/com/gitblit/client/GitblitClient.java b/src/main/java/com/gitblit/client/GitblitClient.java index f5bba1ad..aecf81f6 100644 --- a/src/main/java/com/gitblit/client/GitblitClient.java +++ b/src/main/java/com/gitblit/client/GitblitClient.java @@ -33,10 +33,6 @@ import com.gitblit.Constants.AccessRestrictionType; 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,34 +115,19 @@ public class GitblitClient implements Serializable { refreshRepositories();
refreshSubscribedFeeds(0);
- try {
- // credentials may not have administrator access
- // or server may have disabled rpc management
- refreshUsers();
- if (protocolVersion > 1) {
- 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();
+ // credentials may not have administrator access
+ // or server may have disabled rpc management
+ refreshUsers();
+ if (protocolVersion > 1) {
+ refreshTeams();
}
+ allowManagement = true;
+
+ // credentials may not have administrator access
+ // or server may have disabled rpc administration
+ refreshStatus();
+ allowAdministration = true;
+
}
public int getProtocolVersion() {
|