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

Consider making MessageChannel a @FunctionalInterface [SPR-14854] #19420

Closed
spring-projects-issues opened this issue Oct 26, 2016 · 4 comments
Closed

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 26, 2016

Gary Russell opened SPR-14854 and commented

We have a number of test cases with ...

handler.setOutputChannel(new MessageChannel() {

	@Override
	public boolean send(Message<?> message, long timeout) {
                ...
	}

	@Override
	public boolean send(Message<?> message) {
		return send(message, 0);
	}
});

If there was a default implementation of one of these methods, we could use lambdas in the test cases.


Affects: 5.0 M2

Referenced from: commits spring-projects/spring-integration@67d6cd0

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 27, 2016

Juergen Hoeller commented

Good point. I've declared send(Message) into as a default method, calling the other one with INDEFINITE_TIMEOUT.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 28, 2016

Gary Russell commented

Hi Juergen Hoeller thanks for this; that's a good default.

However, I don't see this change on master; am I missing something?

Thanks.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 28, 2016

Juergen Hoeller commented

Gary Russell I haven't pushed it yet since I was waiting for other changes to wrap up. I'll push it along with everything I got ready in a few minutes.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 28, 2016

Gary Russell commented

Juergen Hoeller No problem - no rush, it was just that the JIRA was marked resolved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants