aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-02-07 14:46:57 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-02-08 17:18:43 +0100
commit1935ac8673c476e45016cc60591e70074ddc7d6b (patch)
treea14026d004126afffb43f0017735e11de2a5b0ea /server/sonar-ce
parentc9f83d3e0300602117c9fa48fe9e9427d7d82f8a (diff)
downloadsonarqube-1935ac8673c476e45016cc60591e70074ddc7d6b.tar.gz
sonarqube-1935ac8673c476e45016cc60591e70074ddc7d6b.zip
SONAR-8716 Simplify CeUserSession
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/user/CeUserSession.java38
1 files changed, 17 insertions, 21 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/user/CeUserSession.java b/server/sonar-ce/src/main/java/org/sonar/ce/user/CeUserSession.java
index aeffd092e66..4f163425418 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/user/CeUserSession.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/user/CeUserSession.java
@@ -37,89 +37,85 @@ public class CeUserSession implements UserSession {
@Override
public String getLogin() {
- return notImplemented();
+ throw notImplemented();
}
@Override
public String getName() {
- return notImplemented();
+ throw notImplemented();
}
@Override
public Integer getUserId() {
- return notImplemented();
+ throw notImplemented();
}
@Override
public Collection<GroupDto> getGroups() {
- return notImplemented();
+ throw notImplemented();
}
@Override
public boolean isLoggedIn() {
- return notImplementedBooleanMethod();
+ throw notImplemented();
}
@Override
public boolean isRoot() {
- return notImplementedBooleanMethod();
+ throw notImplemented();
}
@Override
public UserSession checkIsRoot() {
- return notImplemented();
+ throw notImplemented();
}
@Override
public UserSession checkLoggedIn() {
- return notImplemented();
+ throw notImplemented();
}
@Override
public boolean hasPermission(String globalPermission) {
- return notImplementedBooleanMethod();
+ throw notImplemented();
}
@Override
public boolean hasOrganizationPermission(String organizationUuid, String permission) {
- return notImplementedBooleanMethod();
+ throw notImplemented();
}
@Override
public UserSession checkOrganizationPermission(String organizationUuid, String permission) {
- return notImplemented();
+ throw notImplemented();
}
@Override
public List<String> globalPermissions() {
- return notImplemented();
+ throw notImplemented();
}
@Override
public UserSession checkComponentPermission(String projectPermission, ComponentDto component) {
- return notImplemented();
+ throw notImplemented();
}
@Override
public UserSession checkComponentUuidPermission(String permission, String componentUuid) {
- return notImplemented();
+ throw notImplemented();
}
@Override
public boolean hasComponentPermission(String permission, ComponentDto component) {
- return notImplementedBooleanMethod();
+ throw notImplemented();
}
@Override
public boolean hasComponentUuidPermission(String permission, String componentUuid) {
- return notImplementedBooleanMethod();
+ throw notImplemented();
}
- private static <T> T notImplemented() {
- throw new UnsupportedOperationException(UOE_MESSAGE);
- }
-
- private static boolean notImplementedBooleanMethod() {
+ private static RuntimeException notImplemented() {
throw new UnsupportedOperationException(UOE_MESSAGE);
}
}