Skip to content
Snippets Groups Projects
Commit a65ab9c8 authored by Sebastian Bergemann's avatar Sebastian Bergemann
Browse files

GREEN (corrected minor flaws)

Issue-ref: 4273
Issue-URL: af3#4273



Signed-off-by: default avatarSebastian Bergemann <bergemann@fortiss.org>
parent 8e0de09f
No related branches found
No related tags found
1 merge request!1894273
Pipeline #37476 passed
Pipeline: maven-releng

#37477

    VariabilityUtils.java 3a10f28d57ca4da70b6236b74bd682fa8b03582a YELLOW
    VariabilityUtils.java 6f2ffd231c27f5f7ab8c62d05350c0a92392eaf8 GREEN
    ......@@ -174,17 +174,17 @@ public class VariabilityUtils {
    () -> elem.addSpecification(finalSpec));
    }
    final OptionalVariationPointSpecification finalSpec = spec;
    // Change model only, if the new presence condition is different from the old one
    PresenceCondition oldPC = spec.getPresenceCondition();
    // Change model only if the new presence condition is different from the old one
    PresenceCondition oldPc = spec.getPresenceCondition();
    // If both pc are null, there is nothing to change
    if(oldPC == null && pc == null) {
    if(oldPc == null && pc == null) {
    return true;
    }
    // Check whether the old and new are different (i.e. one being null or different value)
    if(oldPC == null || pc == null ||
    !oldPC.getStringRepresentation().equals(pc.getStringRepresentation())) {
    // Check whether the old and new are different (i.e., one being null or different value)
    if(oldPc == null || pc == null ||
    !oldPc.getStringRepresentation().equals(pc.getStringRepresentation())) {
    final OptionalVariationPointSpecification finalSpec = spec;
    ICommandStackService.getInstance().runAsCommand(elem,
    () -> finalSpec.setPresenceCondition(pc));
    }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment