Skip to content

Commit 0230bb2

Browse files
committed
Refactor access to goalCallback
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
1 parent 7aa8ad4 commit 0230bb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rcljava/src/main/java/org/ros2/rcljava/action/ActionServerImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,8 @@ private ActionServerGoalHandle<T> executeGoalRequest(
328328
return null;
329329
}
330330

331-
// Workaround type
332-
GoalCallback<GoalRequestDefinition> callback = ((ActionServerImpl) this).goalCallback;
333331
// Call user callback
332+
GoalCallback callback = this.goalCallback;
334333
GoalCallback.GoalResponse response = callback.handleGoal(requestMessage);
335334

336335
boolean accepted = GoalCallback.GoalResponse.ACCEPT == response;

0 commit comments

Comments
 (0)