Changeset 42 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/events/CMSEvaluationEvent.java


Ignore:
Timestamp:
08/07/2017 12:57:39 PM (9 years ago)
Author:
bmcguffin
Message:

Fixed a bug which caused null evaluation events to be improperly translated to text.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/structures/events/CMSEvaluationEvent.java

    r38 r42  
    6262    public String toXML() 
    6363    { 
    64         String output = openTag(ELEMENT.CMS_EVALUATION.tag+" cmsID=\""+cmsID+"\" type=\""+cmsType+"\""); 
     64        String output = openTag(ELEMENT.CMS_EVALUATION.tag + " cmsID=\"" + cmsID + "\" type=\"" + cmsType + "\""); 
    6565        output += openTag(ELEMENT.LOCATION.tag); 
    6666        output += location; 
    6767        output += closeTag(ELEMENT.LOCATION.tag); 
    68          
    69         if(message.size() > 0) 
     68 
     69        if (message.size() > 0) 
    7070        { 
    7171            output += openTag(ELEMENT.SAMPLE_MESSAGE.tag); 
    72             for(String str: message) 
     72            for (String str : message) 
    7373            { 
     74                if (str == null) 
     75                { 
     76                    str = ""; 
     77                } 
    7478                output += openTag(ELEMENT.CMS_LINE.tag); 
    7579                output += str; 
     
    7882            output += closeTag(ELEMENT.SAMPLE_MESSAGE.tag); 
    7983        } 
    80          
     84 
    8185        output += closeTag(ELEMENT.CMS_EVALUATION.tag); 
    82          
     86 
    8387        return output; 
    8488    } 
Note: See TracChangeset for help on using the changeset viewer.