Ignore:
Timestamp:
2017-02-12T16:32:18+01:00 (7 years ago)
Author:
Don-vip
Message:

refactor handling of null values - use Java 8 Optional where possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java

    r9078 r11553  
    99import java.util.Collections;
    1010import java.util.List;
     11import java.util.Optional;
    1112
    1213import org.openstreetmap.josm.command.ChangePropertyCommand;
     
    122123     */
    123124    public void setNew(String value) {
    124         if (value == null) {
    125             value = "";
    126         }
    127         this.value = value;
     125        this.value = Optional.ofNullable(value).orElse("");
    128126        this.type = MultiValueDecisionType.KEEP_ONE;
    129 
    130127    }
    131128
Note: See TracChangeset for help on using the changeset viewer.