diff --git a/http-generator-core/src/main/java/io/avaje/http/generator/core/MethodReader.java b/http-generator-core/src/main/java/io/avaje/http/generator/core/MethodReader.java index d427b57b..b51abc30 100644 --- a/http-generator-core/src/main/java/io/avaje/http/generator/core/MethodReader.java +++ b/http-generator-core/src/main/java/io/avaje/http/generator/core/MethodReader.java @@ -338,7 +338,9 @@ public void buildApiDocumentation() { public List roles() { final var roles = new ArrayList<>(methodRoles); - roles.addAll(bean.roles()); + if (roles.isEmpty()) { + roles.addAll(bean.roles()); + } return roles; } @@ -521,7 +523,7 @@ private List namedSegments() { private boolean allArgParamNames() { for (int i = 0; i < params.size(); i++) { - if (!params.get(i).name().equals("arg" + i)) { + if (!("arg" + i).equals(params.get(i).name())) { return false; } }