Skip to content

Commit da8dc0b

Browse files
Updated deprecated method to Long.valueOf()
1 parent 6f349ed commit da8dc0b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/main/java/guru/springframework/controllers/RecipeController.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public RecipeController(RecipeService recipeService) {
2626
@GetMapping("/recipe/{id}/show")
2727
public String showById(@PathVariable String id, Model model){
2828

29-
model.addAttribute("recipe", recipeService.findById(new Long(id)));
30-
29+
model.addAttribute("recipe", recipeService.findById(Long.valueOf(id)));
3130
return "recipe/show";
3231
}
3332

0 commit comments

Comments
 (0)