Skip to content

Commit

Permalink
[cleanup] Fixed some smells reported by SonarCube
Browse files Browse the repository at this point in the history
  • Loading branch information
meronbrouwer committed Sep 21, 2023
1 parent c63439c commit b0dd589
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void postActivation() {
}

private void drawCoordinateText(final int x, final int y, final int value, final int deltaX, final int deltaY) {
var text = textFactory.createText(Integer.valueOf(value).toString(), TEXT_COLOR);
var text = textFactory.createText(Integer.toString(value), TEXT_COLOR);
text.setLayoutX((double) x + deltaX);
text.setLayoutY((double) y + deltaY);
pane.getChildren().add(text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void postActivationDrawsOnlyOriginOfCoordinateGridIfWidthHeightIsMinimal() {
sut.postActivation();

// Assert
verify(textFactoryMock, times(2)).createText(eq("0"), eq(CoordinateGridDelegate.TEXT_COLOR));
verify(textFactoryMock, times(2)).createText("0", CoordinateGridDelegate.TEXT_COLOR);
}

@Test
Expand All @@ -99,7 +99,7 @@ void postActivationDrawsOriginOfCoordinateGrid() {
sut.postActivation();

// Assert
verify(textFactoryMock, times(2)).createText(eq("0"), eq(CoordinateGridDelegate.TEXT_COLOR));
verify(textFactoryMock, times(2)).createText("0", CoordinateGridDelegate.TEXT_COLOR);
}

@Test
Expand Down

0 comments on commit b0dd589

Please sign in to comment.