Minor refacto

This commit is contained in:
Alexandre Archambault 2016-07-03 16:33:04 +02:00
parent efb4f6c5c0
commit ffd58b51b0
No known key found for this signature in database
GPG Key ID: 14640A6839C263A9
1 changed files with 11 additions and 17 deletions

View File

@ -434,24 +434,18 @@ object Resolution {
activation: Activation, activation: Activation,
props: Map[String, String] props: Map[String, String]
): Boolean = ): Boolean =
if (activation.properties.isEmpty) activation.properties.nonEmpty &&
false activation.properties.forall {
else case (name, valueOpt) =>
activation props.get(name).exists { v =>
.properties valueOpt.forall { reqValue =>
.forall {case (name, valueOpt) => if (reqValue.startsWith("!"))
props v != reqValue.drop(1)
.get(name) else
.exists{ v => v == reqValue
valueOpt
.forall { reqValue =>
if (reqValue.startsWith("!"))
v != reqValue.drop(1)
else
v == reqValue
}
} }
} }
}
def userProfileActivation(userProfiles: Set[String])( def userProfileActivation(userProfiles: Set[String])(
id: String, id: String,