Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaDoc and NPE on toString fixed #1445

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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