]> source.dussan.org Git - gitblit.git/commitdiff
Remove empty catch blocks to stop swallowing exceptions. #498 979/head
authorMartin Spielmann <martin.spielmann@pingunaut.com>
Tue, 8 Dec 2015 13:30:11 +0000 (14:30 +0100)
committerMartin Spielmann <martin.spielmann@pingunaut.com>
Tue, 8 Dec 2015 13:30:11 +0000 (14:30 +0100)
src/main/java/com/gitblit/client/GitblitClient.java

index f5bba1add3674644f79db7104d6174503302669b..aecf81f6fc1ef22fa6968d9241efa5039f35092d 100644 (file)
@@ -33,10 +33,6 @@ import com.gitblit.Constants.AccessRestrictionType;
 import com.gitblit.Constants.AuthorizationControl;\r
 import com.gitblit.Constants.PermissionType;\r
 import com.gitblit.Constants.RegistrantType;\r
-import com.gitblit.GitBlitException.ForbiddenException;\r
-import com.gitblit.GitBlitException.NotAllowedException;\r
-import com.gitblit.GitBlitException.UnauthorizedException;\r
-import com.gitblit.GitBlitException.UnknownRequestException;\r
 import com.gitblit.Keys;\r
 import com.gitblit.models.FederationModel;\r
 import com.gitblit.models.FeedEntryModel;\r
@@ -119,34 +115,19 @@ public class GitblitClient implements Serializable {
                refreshRepositories();\r
                refreshSubscribedFeeds(0);\r
 \r
-               try {\r
-                       // credentials may not have administrator access\r
-                       // or server may have disabled rpc management\r
-                       refreshUsers();\r
-                       if (protocolVersion > 1) {\r
-                               refreshTeams();\r
-                       }\r
-                       allowManagement = true;\r
-               } catch (UnauthorizedException e) {\r
-               } catch (ForbiddenException e) {\r
-               } catch (NotAllowedException e) {\r
-               } catch (UnknownRequestException e) {\r
-               } catch (IOException e) {\r
-                       e.printStackTrace();\r
-               }\r
-\r
-               try {\r
-                       // credentials may not have administrator access\r
-                       // or server may have disabled rpc administration\r
-                       refreshStatus();\r
-                       allowAdministration = true;\r
-               } catch (UnauthorizedException e) {\r
-               } catch (ForbiddenException e) {\r
-               } catch (NotAllowedException e) {\r
-               } catch (UnknownRequestException e) {\r
-               } catch (IOException e) {\r
-                       e.printStackTrace();\r
+               // credentials may not have administrator access\r
+               // or server may have disabled rpc management\r
+               refreshUsers();\r
+               if (protocolVersion > 1) {\r
+                       refreshTeams();\r
                }\r
+               allowManagement = true;\r
+\r
+               // credentials may not have administrator access\r
+               // or server may have disabled rpc administration\r
+               refreshStatus();\r
+               allowAdministration = true;\r
+\r
        }\r
 \r
        public int getProtocolVersion() {\r