Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in example code in spring reactive reference document [SPR-16300] #20847

Closed
spring-issuemaster opened this issue Dec 13, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Dec 13, 2017

Lei Chen opened SPR-16300 and commented

The current example code:

import static org.springframework.http.HttpStatus.UNAUTHORIZED;

SecurityManager securityManager = ...
RouterFunction<ServerResponse> route = ...

RouterFunction<ServerResponse> filteredRoute =
	route.filter(request, next) -> { // line with typo
		if (securityManager.allowAccessTo(request.path())) {
			return next.handle(request);
		}
		else {
			return ServerResponse.status(UNAUTHORIZED).build();
		}
  });

Notice there is a ( missing in the invocation route.filter, which may confuse the readers.


Affects: 5.0.2

Reference URL: https://docs.spring.io/spring-framework/docs/5.0.0.BUILD-SNAPSHOT/spring-framework-reference/html/web-reactive.html#_handlerfilterfunction

Referenced from: commits b8201f4

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 15, 2017

Arjen Poutsma commented

Thanks for spotting this! Fixed in b8201f4

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 27, 2017

Lei Chen commented

GJ, thanks Arjen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.