Skip to content

Commit

Permalink
ISPN-10644 Random failures in JsonSerializationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavonalle authored and ryanemerson committed Sep 24, 2019
1 parent d075f62 commit 873caa3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -29,7 +29,7 @@
*/
public class GlobalAuthorizationConfiguration implements ConfigurationInfo {
public static final AttributeDefinition<Boolean> ENABLED = AttributeDefinition.builder("enabled", false).immutable().build();
public static final AttributeDefinition<AuditLogger> AUDIT_LOGGER = AttributeDefinition.builder("auditLogger", (AuditLogger)new NullAuditLogger()).copier(IdentityAttributeCopier.INSTANCE).immutable().build();
public static final AttributeDefinition<AuditLogger> AUDIT_LOGGER = AttributeDefinition.builder("auditLogger", (AuditLogger) new NullAuditLogger()).copier(IdentityAttributeCopier.INSTANCE).immutable().build();

public static final AttributeDefinition<Map<String, Role>> ROLES = AttributeDefinition.<Map<String, Role>>builder("roles", new HashMap<>())
.serializer(new AttributeSerializer<Map<String, Role>, GlobalAuthorizationConfiguration, ConfigurationBuilderInfo>() {
Expand All @@ -39,7 +39,7 @@ public Object getSerializationValue(Attribute<Map<String, Role>> attribute, Glob
return attribute.get().entrySet().stream()
.collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().getPermissions()));
}
}).build();
}).initializer(HashMap::new).build();

static final AttributeSet attributeDefinitionSet() {
return new AttributeSet(GlobalAuthorizationConfiguration.class, ENABLED, AUDIT_LOGGER, ROLES);
Expand Down
Expand Up @@ -19,9 +19,9 @@
@BuiltBy(WhiteListConfigurationBuilder.class)
public class WhiteListConfiguration implements ConfigurationInfo {
static final AttributeDefinition<Set<String>> CLASSES = AttributeDefinition.builder("classes", new HashSet<>(), (Class<Set<String>>) (Class<?>) Set.class)
.immutable().build();
.initializer(HashSet::new).immutable().build();
static final AttributeDefinition<List<String>> REGEXPS = AttributeDefinition.builder("regexps", new ArrayList<>(), (Class<List<String>>) (Class<?>) List.class)
.immutable().build();
.initializer(ArrayList::new).immutable().build();

static ElementDefinition ELEMENT_DEFINITION = new DefaultElementDefinition(WHITE_LIST.getLocalName());

Expand Down
Expand Up @@ -23,8 +23,8 @@ public class SaslConfiguration implements ConfigurationInfo {
public static final AttributeDefinition<Set<String>> MECHANISMS = AttributeDefinition.builder("mechanisms", null, (Class<Set<String>>) (Class<?>) Set.class)
.initializer(LinkedHashSet::new).immutable().build();
public static final AttributeDefinition<List<QOP>> QOP = AttributeDefinition.builder("qop", new ArrayList<>(), (Class<List<QOP>>) (Class<?>) List.class)
.immutable().build();
public static final AttributeDefinition<List<Strength>> STRENGTH = AttributeDefinition.builder("strength", new ArrayList<>(), (Class<List<Strength>>) (Class<?>) Strength.class).immutable().build();
.initializer(ArrayList::new).immutable().build();
public static final AttributeDefinition<List<Strength>> STRENGTH = AttributeDefinition.builder("strength", new ArrayList<>(), (Class<List<Strength>>) (Class<?>) Strength.class).initializer(ArrayList::new).immutable().build();
static final AttributeDefinition<Map<String, String>> SASL_PROPERTIES = AttributeDefinition.builder("property", null, (Class<Map<String, String>>) (Class<?>) Map.class).initializer(LinkedHashMap::new).autoPersist(false).immutable().build();

private final AttributeSet attributes;
Expand Down

0 comments on commit 873caa3

Please sign in to comment.