Skip to content

Commit

Permalink
extract variable
Browse files Browse the repository at this point in the history
  • Loading branch information
avalax committed Oct 16, 2016
1 parent 0a78368 commit eaaf021
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public Workout createFromJson(String contents) throws WorkoutParseException {
set.setWeight(weight);
set.setMaxReps(maxReps);
}
workout.getExercises().addExercise(workout.getExercises().countOfExercises(), exercise);
int countOfExercises = workout.getExercises().countOfExercises();
workout.getExercises().addExercise(countOfExercises, exercise);
}
return workout;
} catch (JsonSyntaxException re) {
Expand Down

0 comments on commit eaaf021

Please sign in to comment.