package com.github.tomitakussaari.mysqlcluscon;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.sql.Connection;
import java.sql.SQLException;


@RequiredArgsConstructor
class ConnectionInfo implements AutoCloseable {
    @Getter
    private final Connection connection;
    @Getter
    private final ConnectionChecker checker;
    @Getter(lazy = true)
    private final ConnectionStatus status = calculateStatus();

    @Override
    public void close() {
        try {
            connection.close();
        } catch (SQLException e) {
            //ignored
        }
    }

    private ConnectionStatus calculateStatus() {
        return checker.connectionStatus(connection);
    }
}

@@ -290,28 +290,16 @@
 ection;%0A
-    @Getter%0A
     priv

Remove unncessary @GETTER from ConnectionInfo