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

java.lang.ClassCastException thrown after making squid:S1612 changes. #12

Open
MadAboutProgramming opened this issue Jan 10, 2020 · 0 comments

Comments

@MadAboutProgramming
Copy link

MadAboutProgramming commented Jan 10, 2020

squid:S1612 (Lambdas should be replaced with method references)

I have something called (value -> (value != null) in my project, But sonarQube recommended to change (Objects::nonNull).

After making above changes application stop working by throwing the java.lang.ClassCastException.

Example:

DataStream configurations = env
.addSource(createConfigurations(kafkaProps))
.uid(Constants.KAFKA_SOURCE)
.filter(value -> (value != null));

Made the changes to

DataStream configurations = env
.addSource(createConfigurations(kafkaProps))
.uid(Constants.KAFKA_SOURCE)
.filter(Objects::nonNull));

Exception: java.lang.ClassCastException

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

No branches or pull requests

1 participant