File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
http-generator-core/src/main/java/io/avaje/http/generator/core Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ private List<Element> initInterfaces() {
84
84
List <Element > interfaces = new ArrayList <>();
85
85
for (TypeMirror anInterface : beanType .getInterfaces ()) {
86
86
final Element ifaceElement = ctx .asElement (anInterface );
87
- if (!ifaceElement .getAnnotation (Controller .class ).value ().isBlank ()
87
+ var controller = ifaceElement .getAnnotation (Controller .class );
88
+ if (controller != null && !controller .value ().isBlank ()
88
89
|| ifaceElement .getAnnotation (Path .class ) != null ) {
89
90
interfaces .add (ifaceElement );
90
91
}
@@ -257,7 +258,7 @@ public List<MethodReader> methods() {
257
258
258
259
public String path () {
259
260
260
- return Optional .of (findAnnotation (Controller .class ))
261
+ return Optional .ofNullable (findAnnotation (Controller .class ))
261
262
.map (Controller ::value )
262
263
.filter (not (String ::isBlank ))
263
264
.or (() -> Optional .ofNullable (findAnnotation (Path .class )).map (Path ::value ))
You can’t perform that action at this time.
0 commit comments