Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tlatools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
tlatools
Commits
2034a667
Commit
2034a667
authored
Feb 21, 2018
by
Markus Alexander Kuppe
Browse files
Options
Downloads
Patches
Plain Diff
Trace exploration broken due to NullPointerException caused by null
action name. [Bug][TLC]
parent
ee1ac680
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tlatools/src/tlc2/tool/Action.java
+7
-2
7 additions, 2 deletions
tlatools/src/tlc2/tool/Action.java
tlatools/src/tlc2/tool/Tool.java
+1
-1
1 addition, 1 deletion
tlatools/src/tlc2/tool/Tool.java
with
8 additions
and
3 deletions
tlatools/src/tlc2/tool/Action.java
+
7
−
2
View file @
2034a667
...
...
@@ -10,6 +10,8 @@ import tlc2.util.Context;
import
util.UniqueString
;
public
final
class
Action
implements
ToolGlobals
,
Serializable
{
public
static
final
UniqueString
UNNAMED_ACTION
=
UniqueString
.
uniqueStringOf
(
"UnnamedAction"
);
/* A TLA+ action. */
/* Fields */
...
...
@@ -19,7 +21,7 @@ public final class Action implements ToolGlobals, Serializable {
/* Constructors */
public
Action
(
SemanticNode
pred
,
Context
con
)
{
this
(
pred
,
con
,
(
UniqueString
)
null
);
this
(
pred
,
con
,
UNNAMED_ACTION
);
}
public
Action
(
SemanticNode
pred
,
Context
con
,
UniqueString
actionName
)
{
...
...
@@ -34,13 +36,16 @@ public final class Action implements ToolGlobals, Serializable {
}
public
final
String
getLocation
()
{
if
(
actionName
!=
null
&&
!
""
.
equals
(
actionName
.
toString
()))
{
if
(
actionName
!=
UNNAMED_ACTION
&&
actionName
!=
null
&&
!
""
.
equals
(
actionName
.
toString
()))
{
// If known, print the action name instead of the generic string "Action".
return
"<"
+
actionName
+
" "
+
pred
.
getLocation
()
+
">"
;
}
return
"<Action "
+
pred
.
getLocation
()
+
">"
;
}
/**
* @return The name of this action. Can be {@link Action#UNNAMED_ACTION}.
*/
public
final
UniqueString
getName
()
{
return
actionName
;
}
...
...
This diff is collapsed.
Click to expand it.
tlatools/src/tlc2/tool/Tool.java
+
1
−
1
View file @
2034a667
...
...
@@ -166,7 +166,7 @@ public class Tool
}
private
final
void
getActions
(
SemanticNode
next
,
Context
con
)
{
this
.
getActions
(
next
,
con
,
null
);
this
.
getActions
(
next
,
con
,
Action
.
UNNAMED_ACTION
);
}
private
final
void
getActions
(
SemanticNode
next
,
Context
con
,
final
UniqueString
actionName
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment