refactor: Remove deprecated method of newInstance (#2594)

This commit is contained in:
kongleong86 authored and GitHub committed 2023-10-14 13:58:15 +03:00
1 parent 38d28870f2
commit 1bea90ed9c
2 files changed
+4 -3

No files matched your search

@@ -38,7 +38,7 @@ public class FrontController {
private Command getCommand(String request) {
var commandClass = getCommandClass(request);
try {
return (Command) commandClass.newInstance();
return (Command) commandClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new ApplicationException(e);
}