Changeset 46:dd22a423bc8a in rrlib_serialization-java


Ignore:
Timestamp:
21.05.2019 11:43:58 (7 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Message:

Adjusts DataTypeBase.getJavaClass() for list types (to never return null if an element type ist set; this enables e.g. finstruct to handle more list types in port view)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtti/DataTypeBase.java

    r44 r46  
    2929import org.rrlib.serialization.BinaryInputStream; 
    3030import org.rrlib.serialization.BinaryOutputStream; 
     31import org.rrlib.serialization.PortDataListImpl; 
    3132import org.rrlib.serialization.PublishedRegisters; 
    3233import org.rrlib.serialization.Register; 
     
    198199     */ 
    199200    public Class<?> getJavaClass() { 
    200         return javaClass; 
     201        return javaClass != null ? javaClass : ((getTypeClassification() == CLASSIFICATION_LIST && elementType != null) ? PortDataListImpl.class : null); 
    201202    } 
    202203 
Note: See TracChangeset for help on using the changeset viewer.