My project at current job use private access modifier for methods of MVC controllers:
@Controller
public class HelloWorldController {
@RequestMapping("/helloWorld")
private ModelAndView helloWorld() {
I have integrated PMD and his report has a lot of:
/src/main/java/com/web/controller/SignalController.java:91: Avoid unused private
methods such as 'handleNewRequest()'.
So instead of disabling useful PMD rule I think to change controller's methods visibility to public.
Are there any reasons to keep controller's methods private?