UserSessionFinishedEvent wrong returned object in getUserSession method

Hi,

Why method getUserSession returned source not session (source is a Connection)

public class UserSessionFinishedEvent extends ApplicationEvent {
    protected final UserSession session;

    public UserSessionFinishedEvent(Connection source, UserSession session) {
        super(source);

        this.session = session;
    }

    @Override
    public Connection getSource() {
        return (Connection) super.getSource();
    }

    public Connection getConnection() {
        return (Connection) super.getSource();
    }

    public UserSession getUserSession() {
        return (UserSession) super.getSource();
    }
}

Regards
Marcin

1 Like

Hi,

Thank you for reporting the problem.

It is definitely a bug, will release fixes soon: https://github.com/cuba-platform/cuba/issues/1070