I have abstract class which have two methods as follows:
public abstract class SessionExecutionBody {
public Object execute() {
executeWithoutResult();
return null;
}
public void executeWithoutResult() {}
}
and I implement the class as follows:
final HTTPDestination destination = sessionService.executeInLocalView(new SessionExecutionBody() {
@Override
public Object execute() {
userService.setCurrentUser(userService.getAdminUser());
final String destinationName = getConfigurationService().getConfiguration().getString(DESTINATION_PROPERTY);
return getHttpDestinationService().getHTTPDestination(destinationName);
When I run sonarLint its showing major issue convert this anonymous class to lambda expression but I am unable to find the way to right the same , Can I convert that expression into a lambda?