Skip to content

Commit

Permalink
Merge pull request #1445 from lf-lang/silly-fixes
Browse files Browse the repository at this point in the history
Fixed javadoc and NPE on toString.
  • Loading branch information
lhstrh authored Nov 2, 2022
2 parents d9095f4 + 1cf04fc commit 04a1ad2
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 04a1ad2

Please sign in to comment.