de4a-eu / de4a

DE4A WP5 Connector
Apache License 2.0
2 stars 5 forks source link

Method overrides but has not annotated parameters with NonNullableApi #14

Closed daffyDukk closed 3 years ago

daffyDukk commented 3 years ago

https://github.com/de4a-wp5/de4a/blob/d47997f6deda975bc61f036432c1494e96ae3276/de4a-connector/src/main/java/eu/de4a/connector/api/controller/CustomRestExceptionHandler.java#L35

Overriding methods should also annotate the parameters with the correct annotations. This goes for all methods in this class

aosunacab commented 3 years ago

As far as I know, super method handleMissingServletRequestParameter has no annotations on definition. Maybe I am missundertanding you Spring API Docs

daffyDukk commented 3 years ago

That one does not. But all the other parameters have annotatiosn to them

daffyDukk commented 3 years ago

I just marked the first line and did not explain further. my bad

phax commented 3 years ago

@aosunacab I think Daniel means the @Override for implemented methods

daffyDukk commented 3 years ago

This is the actual code

@Override
protected ResponseEntity<Object> handleMissingServletRequestParameter(
      MissingServletRequestParameterException ex, HttpHeaders headers, 
      HttpStatus status, WebRequest request) {

This is how it should look

@Override
protected ResponseEntity<Object> handleMissingServletRequestParameter(
      MissingServletRequestParameterException ex, @NonNull HttpHeaders headers, 
      @NonNull HttpStatus status, @NonNull WebRequest request) {
daffyDukk commented 3 years ago

Actually.... I might be wrong on this @aosunacab . Leave it for now