INF-2529 Clean code, taking in account java best practice

Fixed the getLastNode method logic by assuring that there will be a default chosen label even when there is no job to follow