Syntax error on tokens, delete these tokens - kafka spring integration demo application

273 views Asked by At

I am trying to use the demo application for spring kafka integration and getting an "syntax error on token, delete these token" error in eclipse. looks to be simple one, but i dont know how to fix.

errors at return args ->

@Bean
@DependsOn("kafkaOutboundChannelAdapter")
CommandLineRunner kickOff(@Qualifier("inputToKafka") MessageChannel in) {
    return args -> {
        for (int i = 0; i < 1000; i++) {
            in.send(new GenericMessage<>("#" + i));
            log.info("sending message #" + i);
        }
    };
}
1

There are 1 answers

0
nitind On BEST ANSWER

You're using Java 8 syntax, but Kepler SR2 itself doesn't support Java 8 syntax without the patches discussed here: https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler . Luna officially supports Java 8.