code fixes
This commit is contained in:
parent
7e725ff765
commit
e5ac36c010
4 changed files with 7 additions and 7 deletions
|
@ -9,7 +9,6 @@
|
|||
package ch.ethz.seb.sebserver.gbl;
|
||||
|
||||
import java.text.Collator;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -25,6 +24,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
|
|||
import ch.ethz.seb.sebserver.gbl.api.APIMessage;
|
||||
import ch.ethz.seb.sebserver.gbl.api.EntityType;
|
||||
import ch.ethz.seb.sebserver.gbl.api.authorization.Privilege;
|
||||
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||
|
||||
/** Global Constants used in SEB Server web-service as well as in web-gui component */
|
||||
public final class Constants {
|
||||
|
@ -162,7 +162,7 @@ public final class Constants {
|
|||
|
||||
public static final Collator DEFAULT_ENGLISH_COLLATOR = Collator.getInstance(Locale.ENGLISH);
|
||||
|
||||
public static final List<EntityType> ENTITY_TYPE_HIRARCHIE = Arrays.asList(
|
||||
public static final List<EntityType> ENTITY_TYPE_HIRARCHIE = Utils.immutableListOf(
|
||||
EntityType.INSTITUTION,
|
||||
EntityType.USER,
|
||||
EntityType.USER_ACTIVITY_LOG,
|
||||
|
|
|
@ -101,11 +101,10 @@ public class ClientGroup implements ClientGroupData {
|
|||
this.examId = examId;
|
||||
this.name = name;
|
||||
this.type = type == null ? ClientGroupType.NONE : type;
|
||||
;
|
||||
this.color = color;
|
||||
this.icon = icon;
|
||||
|
||||
switch (type) {
|
||||
switch (this.type) {
|
||||
case IP_V4_RANGE: {
|
||||
final String[] split = StringUtils.split(data, Constants.EMBEDDED_LIST_SEPARATOR);
|
||||
this.ipRangeStart = split[0];
|
||||
|
@ -123,6 +122,7 @@ public class ClientGroup implements ClientGroupData {
|
|||
this.ipRangeStart = null;
|
||||
this.ipRangeEnd = null;
|
||||
this.clientOS = ClientOS.NONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
package ch.ethz.seb.sebserver.gbl.model.session;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
@ -23,6 +22,7 @@ import ch.ethz.seb.sebserver.gbl.Constants;
|
|||
import ch.ethz.seb.sebserver.gbl.api.EntityType;
|
||||
import ch.ethz.seb.sebserver.gbl.model.Domain;
|
||||
import ch.ethz.seb.sebserver.gbl.model.GrantEntity;
|
||||
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public final class ClientConnection implements GrantEntity {
|
||||
|
@ -48,7 +48,7 @@ public final class ClientConnection implements GrantEntity {
|
|||
}
|
||||
}
|
||||
|
||||
public final static List<String> ACTIVE_STATES = Arrays.asList(
|
||||
public final static List<String> ACTIVE_STATES = Utils.immutableListOf(
|
||||
ConnectionStatus.ACTIVE.name(),
|
||||
ConnectionStatus.AUTHENTICATED.name(),
|
||||
ConnectionStatus.CONNECTION_REQUESTED.name());
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ViewGridBuilder {
|
|||
|
||||
private static final Logger log = LoggerFactory.getLogger(ViewGridBuilder.class);
|
||||
|
||||
public static Pattern EXPAND_BAR_GROUP_PATTERN = Pattern.compile("\\[(.*?)\\]");
|
||||
public static final Pattern EXPAND_BAR_GROUP_PATTERN = Pattern.compile("\\[(.*?)\\]");
|
||||
|
||||
final ExamConfigurationService examConfigurationService;
|
||||
final Composite parent;
|
||||
|
|
Loading…
Reference in a new issue