From 2402d540b2e7e14c3159b66519edca85d998f671 Mon Sep 17 00:00:00 2001 From: haijian Date: Fri, 15 Oct 2021 09:57:03 +0300 Subject: [PATCH 1/2] fix: show the acurate route class name in err msg --- .../main/java/com/vaadin/flow/router/RouteConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java b/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java index 0022b3d1324..86c8b34ea8b 100644 --- a/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java +++ b/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java @@ -513,7 +513,7 @@ public String getUrl(Class navigationTarget, if (!targetUrl.isPresent()) { throw new NotFoundException(String.format( "No route found for the given navigation target '%s' and parameters '%s'", - navigationTarget.getClass().getName(), + navigationTarget.getName(), parameters.toString())); } return targetUrl.get(); From 7be86674f62a306403b73f6d97b35ea6f0e4ae41 Mon Sep 17 00:00:00 2001 From: haijian Date: Fri, 15 Oct 2021 10:03:39 +0300 Subject: [PATCH 2/2] code format --- .../main/java/com/vaadin/flow/router/RouteConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java b/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java index 86c8b34ea8b..f0a46b67207 100644 --- a/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java +++ b/flow-server/src/main/java/com/vaadin/flow/router/RouteConfiguration.java @@ -513,8 +513,7 @@ public String getUrl(Class navigationTarget, if (!targetUrl.isPresent()) { throw new NotFoundException(String.format( "No route found for the given navigation target '%s' and parameters '%s'", - navigationTarget.getName(), - parameters.toString())); + navigationTarget.getName(), parameters.toString())); } return targetUrl.get(); }