Changeset 13926


Ignore:
Timestamp:
Nov 1, 2019 11:15:58 AM (11 days ago)
Author:
jwedin
Message:

Fixed a problem related to Java 7 compliance. Removed redundant lines of code. #5865

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-jw-2590/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/util/annotations/GenericAnnotationNode.java

    r13923 r13926  
    100100        this.parent = parent;
    101101        valueAnnotation_cacheComputed = isImmutable();
    102         subNodes_cache = isImmutable() ? Collections.<T>emptyList() : new ArrayList<>();
    103         subNodesNameMap_cache = isImmutable() ? Collections.<String, T>emptyMap() : new HashMap<>();
    104         List<String> l = Collections.emptyList();
    105         List<String> a = new ArrayList<>();
     102        subNodes_cache = isImmutable() ? Collections.unmodifiableList(new ArrayList<T>()) : new ArrayList<T>();
     103        subNodesNameMap_cache = isImmutable() ? Collections.unmodifiableMap(new HashMap<String, T>()) : new HashMap<String, T>();
    106104        if (!isImmutable()) {
    107105            setNode(name, node);
Note: See TracChangeset for help on using the changeset viewer.