Transform java lambda expression to 1.6 version

Viewed 1315

I have a code made with java 1.8 and i'd like to transform it to make it work with 1.6.

This code is the following one:

private void handleCanNotConnect(Throwable cause) {
    isConnected = false;
    fireAll(l -> l.connectionFailed(cause));
}

private void fireAll(Consumer<MyListener> action){
    action.accept(listener);
}

How i should transform it?

Regards!

1 Answers
Related