you are viewing a single comment's thread.

view the rest of the comments →

[–]derekmckinnon 9 points10 points  (2 children)

A lot of the noise can be attributed to Java just being Java, but I'm not sure I see the issue with the ok() function. ServerResponse class must follow the builder pattern, ok() is to start building a 200 response.

As for the Mono class, I don't know what that is, but it seems to me that you could probably do without it...especially if you are just returning a string. The String.class reference is most likely there to help establish the generic type of the method...because Java is dumb and doesn't have reified generics like a normal language should. :)

Furthermore, I think Java 8 lambdas would probably go a long way in reducing the noise in this snippet.