Skip to content

Commit

Permalink
Fixed javadoc and NPE on toString.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee committed Nov 2, 2022
1 parent 38572d1 commit 1cf04fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions org.lflang/src/org/lflang/federated/FederateInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public boolean contains(ReactorInstance instance) {
* in a top-level reaction that belongs to this federate.
* This also returns true if the program is not federated.
*
* @param action The action
* @param timer The timer
* @return True if this federate contains the action in the specified reactor
*/
public boolean contains(Timer timer) {
Expand Down Expand Up @@ -510,7 +510,8 @@ public LinkedHashMap<Output, TimeValue> findOutputsConnectedToPhysicalActions(Re

@Override
public String toString() {
return "Federate " + id + ": " + instantiation.getName();
return "Federate " + id + ": "
+ ((instantiation != null) ? instantiation.getName() : "no name");
}

/////////////////////////////////////////////
Expand Down

0 comments on commit 1cf04fc

Please sign in to comment.