Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[krazo-dev] Annotation inheritance

Hi,

I’m working on the refactoring of the processing of the View-Annotations and I’m not quiet sure on some specifics of the specs.
Consider these controllers (I omitted some annotations - assume that all method are mapped to GET and some URLs):

class SimpleController {
public String view() {
return "helloWorld.html";
}

@View("helloWorld.html")
public void annotatedView() {
}

public String brokenView() {
return null;
}

public void invalidView() {
}

}

@View("helloDuke.html")
static class AnnotatedController extends SimpleController {

}
Is the method „brokenView“ in Simple-Controller valid? 
The specs states that controller methods might return null to fall back to a view annotation. Is throwing an exception if no view annotation exists the right thing to do?

Does this still apply if the method is inherited in the AnnotatedController? 

Thanks,
- Gregor

Back to the top