Skip to content

Commit

Permalink
Ref #553: fix usage of routeBuilder in blueprint (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
f2par0 authored Dec 9, 2024
1 parent ce8e1a8 commit a55ec50
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public <T> T lookupByNameAndType(String name, Class<T> type) {
}

// just to be safe
if (answer == null) {
if (!type.isInstance(answer)) {
return null;
}

try {
return type.cast(answer);
} catch (Throwable e) {
} catch (Exception e) {
String msg = "Found bean: " + name + " in BlueprintContainer: " + blueprintContainer
+ " of type: " + answer.getClass().getName() + " expected type was: " + type;
throw new NoSuchBeanException(name, msg, e);
Expand Down

0 comments on commit a55ec50

Please sign in to comment.